Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login Fails with 3.0.18 #99

Open
J-Light opened this issue May 2, 2019 · 14 comments
Open

Login Fails with 3.0.18 #99

J-Light opened this issue May 2, 2019 · 14 comments

Comments

@J-Light
Copy link

J-Light commented May 2, 2019

Issue

New version of Outlook Plugin Fails to Authenticate Users.

Expected Behavior

Plugin should login users.

Actual Behavior

Fails to login.

Possible Fix

index 2768d1d..08026e2 100644
--- a/SuiteCRMClient/UserSession.cs
+++ b/SuiteCRMClient/UserSession.cs
@@ -134,7 +134,7 @@ namespace SuiteCRMClient

             try
             {
-                loginReturn = AuthenticateCRM(username, hashedPass);
+                loginReturn = AuthenticateCRM(username, password);

                 id = loginReturn.SessionID;
                 SuiteCRMClient.RestAPIWrapper.SuiteCRMUserSession = this;
@@ -149,7 +149,7 @@ namespace SuiteCRMClient
                 _log.Error("Failed first login attempt", e1);
                 try
                 {
-                    loginReturn = AuthenticateCRM(username, password);
+                    loginReturn = AuthenticateCRM(username, hashedPass);

                     id = loginReturn.SessionID;
                     SuiteCRMClient.RestAPIWrapper.SuiteCRMUserSession = this;

Steps to Reproduce

  1. Use Suite 7.10.x
  2. Install Outlook Plugin version 3.0.18
  3. Attempt to authenticate

Context

We have a set of licenses that we cannot now use with this version. Previous version was missing libs for x64 Tidy.

Currently deployed open version for a select few. Would like to avoid this. Above seemed to fix it but not sure if its appropriate.

Logs

HResult:-2146233088
2019-05-01 15:52:34,162 | VSTA_Main | ERROR | Unable to connect to SuiteCRM
SuiteCRMClient.Exceptions.BadCredentialsException: CRM Server error 10 (Invalid Login): Login attempt failed please check the username and password
at SuiteCRMClient.CrmRestServer.CheckForCrmError(String jsonResponse, String payload)
at SuiteCRMClient.CrmRestServer.GetCrmResponse[T](String method, Object input)
at SuiteCRMClient.UserSession.AuthenticateCRM()
at SuiteCRMClient.UserSession.Login()
at SuiteCRMAddIn.Dialogs.SettingsDialog.btnTestLogin_Click(Object sender, EventArgs e)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233088
2019-05-01 15:52:38,954 | VSTA_Main | ERROR | Failed calling 'login'
SuiteCRMClient.Exceptions.BadCredentialsException: CRM Server error 10 (Invalid Login): Login attempt failed please check the username and password
at SuiteCRMClient.CrmRestServer.CheckForCrmError(String jsonResponse, String payload)
at SuiteCRMClient.CrmRestServer.GetCrmResponse[T](String method, Object input)
Data:System.Collections.ListDictionaryInternal
HResult:-2146233088

Your Environment

  • Outlook Plugin Version used: 3.0.18
  • Outlook Client Version used: Office365 version 1903
  • SuiteCRM Version used: 7.10.13
  • Host (e.g. PC, Server):
  • Operating System and version (e.g Windows 10):
@cameronblaikie
Copy link

Hi there,

We have recognised this issue and we are working as hard as we can to resolve this problem.
If there are any other issues you are having with our Plugin could you please raise them on our support page on our store -
https://store.suitecrm.com/support/SuiteCRM-official-outlook-plugin

Thanks,

@simon-brooke
Copy link
Contributor

Profound apologies.

What's happened is that TLS 1.1 was disabled globally on 1st May. We knew this was going to happen and had already upgraded to a version of the .Net libraries which should use TLS 1.3 automatically, but clearly this isn't working.

According to documentation, if you have .Net 4.6.2 or above installed on your computer this should just work. Otherwise, some registry changes (see same documentation) should make it work.

However, I can confirm that at this stage it is not working for me either, although I have .Net 4.7.2 installed

What I'm seeing in the logs is as follows:

2019-05-02 17:13:24,730 | Background | ERROR | Login error
System.Exception: Could not construct 'login' request ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at SuiteCRMClient.CrmRestServer.CreatePostRequest(String requestUrl, Byte[] bytes, String contentTypeAndEncoding) in C:\Users\Simon\Workspace\SuiteCRM-Outlook-Plugin\SuiteCRMClient\CrmRestServer.cs:line 281
   at SuiteCRMClient.CrmRestServer.CreateCrmRestRequest(String strMethod, Object objInput) in C:\Users\Simon\Workspace\SuiteCRM-Outlook-Plugin\SuiteCRMClient\CrmRestServer.cs:line 211

It's possible that the CRM end of the connection isn't supporting TLS 1.3. However, I appreciate that doesn't help users and we need to resolve this very fast.

@simon-brooke
Copy link
Contributor

OK, I now have a build (3.0.19.119) which works; it turns out compiling against .Net 4.6.1 wasn't good enough, it had to be at least 4.6.2. I've passed this to quality control; hopefully we'll have a release very soon.

simon-brooke added a commit to simon-brooke/SuiteCRM-Outlook-Plugin that referenced this issue May 2, 2019
@J-Light
Copy link
Author

J-Light commented May 2, 2019

@simon-brooke Thanks for this.

@cameronblaikie We did log it, but was disheartened to see a number of login issues already being reported with no feedback. I assumed it was not being monitored, so decided to open an issue here. Will use the store cases again in the future. Cheers!

@simon-brooke
Copy link
Contributor

OK, status this morning: it still works for me, both in the dev environment and when installed from the installer. However, it isn't working for @cameronblaikie, and we have failed to establish what is different between my machine and his. We are putting full effort on this!

simon-brooke added a commit to simon-brooke/SuiteCRM-Outlook-Plugin that referenced this issue May 3, 2019
@simon-brooke
Copy link
Contributor

@J-Light please could you confirm for me which Windows version you are running?

@Dillon-Brown
Copy link

Dillon-Brown commented May 3, 2019

@J-Light Rather than the contact form, could you send us an email directly to the outlook team? email address is: [email protected] and we can get you a build send through. Thanks.

simon-brooke added a commit to simon-brooke/SuiteCRM-Outlook-Plugin that referenced this issue May 3, 2019
No confidence in this, essentially just thrashing.
simon-brooke added a commit to simon-brooke/SuiteCRM-Outlook-Plugin that referenced this issue May 3, 2019
…into AddIn

Again, I'm thrashing - no real faith in this. If the change was going to work, SuiteCrmClient has to be the right place for it - surely?
@J-Light
Copy link
Author

J-Light commented May 6, 2019

@simon-brooke I am using Windows 10 Version 1809 (OS Build 17763.437)

image

@simon-brooke
Copy link
Contributor

OK, I'm on Windows 7, and all the last three builds have worked for me. The test team are also on Windows 10, and the last three builds have not worked for them. It may be something to do with the Windows version, but I'm skeptical. However, I'm really running out of ideas.

Have you received either build 3.0.19.124 or 3.0.19.125?

@J-Light
Copy link
Author

J-Light commented May 8, 2019

@simon-brooke no I have not, are the builds available in your branch, you able to point me to them?

@J-Light
Copy link
Author

J-Light commented May 8, 2019

@Dillon-Brown @simon-brooke @cameronblaikie Obtained the plugin from SalesAgility 3.0.19.129 . Issue persists.

The fix proposed was able to overcome this issue. I suspect the hashedPass value is some how calculated incorrectly in Windows 10 (?).

simon-brooke added a commit to simon-brooke/SuiteCRM-Outlook-Plugin that referenced this issue Jun 5, 2019
simon-brooke added a commit to simon-brooke/SuiteCRM-Outlook-Plugin that referenced this issue Jun 5, 2019
simon-brooke added a commit to simon-brooke/SuiteCRM-Outlook-Plugin that referenced this issue Jun 7, 2019
(This works but I don't like it)
simon-brooke added a commit that referenced this issue Jun 24, 2019
No confidence in this, essentially just thrashing.
simon-brooke added a commit that referenced this issue Jun 24, 2019
Again, I'm thrashing - no real faith in this. If the change was going to work, SuiteCrmClient has to be the right place for it - surely?
simon-brooke added a commit that referenced this issue Jun 24, 2019
(This works but I don't like it)
@samus-aran
Copy link
Contributor

Are you able to test this on the 3.0.22

@J-Light
Copy link
Author

J-Light commented Sep 12, 2019

@samus-aran, unfortunately, it still does not work. We are using LDAP for password management. I have tried the addon with (CRM and client) and without (CRM and client) a password encryption key to no avail.

If I recompile the Addin that uses clear text password instead of MD5 hash for standard login, it appears to work (with no encryption key set on the CRM).

@SyFry
Copy link

SyFry commented Jul 22, 2020

I'm also unable to auth with Plugin 3.0.22 to SuiteCRM 7.8.31 with SSO enabled using the encryption key and Active Directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants