Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Login/Script-Errors

 Post Reply Post Reply
Author
Feichtenschlager Thomas View Drop Down
Member
Member
Avatar

Joined: 29 Oct 2011
Posts: 73
Post Options Post Options   Quote Feichtenschlager Thomas Quote  Post ReplyReply Direct Link To This Post Topic: Login/Script-Errors
    Posted: 02 Apr 2016 at 7:51pm
I have an account where I can login with the Browser and create an App- and Secret Key.
But when I use them with the Demo-Apps I get several Skript Errors before the TMS First-Time Login Page Shows. So I cannot Login from the program.
Do I have to Setup anything special else except of the Keys to be able login ?
What is the App Name needed for on the Create Keys Page. Must this match my Exe-Name?

Are there maybe issues with my Norton Anti-Virus or is it an issue about the Edge-Browser?

Sorry for the silly questions asked. These are my First steps with Cloud-Pack. So any help is appreciated.

Of course I read the manual and forums, but could not find a way to start...

Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8408
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 03 Apr 2016 at 10:33am
This issue & solution is explained here:
http://www.tmssoftware.com/site/cloudpack.asp?s=faq&show=749
Back to Top
Feichtenschlager Thomas View Drop Down
Member
Member
Avatar

Joined: 29 Oct 2011
Posts: 73
Post Options Post Options   Quote Feichtenschlager Thomas Quote  Post ReplyReply Direct Link To This Post Posted: 04 Apr 2016 at 9:33am
Hello Bruno,

thanks for your reply. I added my Program-Exe-Name and tried all different values (from 7000 to 11001) for FEATURE_BROWSER_EMULATION but I do not see a difference.

I get these script-errors...
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js
https://api.myclouddata.net/js/angular.js
https://api.myclouddata.net/login.html

Maybe I do not do all needed steps to run the Demo:
I opened the Demo-Project (myCloudDataDemo) added the App- and Secret-Key an hit RUN.
Is it usually that simple or must I add/change anything else in the Demo-Project?

Thanks !


Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2166
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 04 Apr 2016 at 10:11am
Hi,

Adding your App's Key and Secret should be the only thing that needs to be done before you can run the Demo.

Can you please make sure your entry in the Registry Editor looks like this?

Name: myCloudDataDemo.exe
Type: REG_DWORD
Data: 0x00002af9 (11001)


Edited by Bart Holvoet - 04 Apr 2016 at 3:43pm
Back to Top
Feichtenschlager Thomas View Drop Down
Member
Member
Avatar

Joined: 29 Oct 2011
Posts: 73
Post Options Post Options   Quote Feichtenschlager Thomas Quote  Post ReplyReply Direct Link To This Post Posted: 04 Apr 2016 at 11:53am
Hello Bart,

thanks - I checked that and also restarted my Computer for sure - but same result.
Just to make the Basics sure. I develop on Delphi 10 Seattle and Windows 10 where Standard-Browser is Edge. I tried to run the exe on Win10 and Win7 - same results.

I can start the exe - but when I click connect the Errors come up.

I just created a new Project with just an TAdMyCloudData (AppKey='x' and SecretKey='y') and a TButton on it. If I try to connect I get the same script-errors.
I guess the App- and Secret-Key is not even involved at this step before the Login-Page is shown. Could it be a Firewall/Port-Problem on my machine ?

Or should I first try to un-/reinstall the Cloud-Pack ?

Do you have some hints, where/how to check ?

Thanks !
Back to Top
Feichtenschlager Thomas View Drop Down
Member
Member
Avatar

Joined: 29 Oct 2011
Posts: 73
Post Options Post Options   Quote Feichtenschlager Thomas Quote  Post ReplyReply Direct Link To This Post Posted: 04 Apr 2016 at 2:48pm
Hi Bart,

I'm pretty sure it must be something about my Browser/Security-Settings. Although I think that they're not very special.

I downloaded the HTML/JS sample and played with that. The login there also does not run smoothly, but when I confirm a few security-warnings, the TMS-Login-page at least Shows.

Maybe the reason is the the In-App Login Page cannot show/handle these Security-warnings.

I know that your time is very limited - so just to let you know - this is not(!) an urgent issue.

Regards, Tom
Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2166
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 04 Apr 2016 at 3:53pm
Hi Thomas,

We do appreciate any notification of issues with the service and we'll try to improve the service where possible.

It might be that the issue is caused by your Firewall and/or proxy settings.
Can you please provide the exact description of the warnings you are seeing so I can further investigate this?

These URLs should be accessible through your browser for the login page to function correctly:
https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js 
https://api.myclouddata.net/login.html 
Back to Top
Feichtenschlager Thomas View Drop Down
Member
Member
Avatar

Joined: 29 Oct 2011
Posts: 73
Post Options Post Options   Quote Feichtenschlager Thomas Quote  Post ReplyReply Direct Link To This Post Posted: 04 Apr 2016 at 10:16pm
Hello Bart,
I sent you copies of the Script-Errors in a separate message.

I can access https://api.myclouddata.net/login.html.
I can not access https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js 
due to "Der Herausgeber von angular.min.js konnte nicht verifiziert werden."

Interesting detail I found during Investigation...
In TAdvMyCloudData.DoAuth the URL for Auth-Process is created. If I grab this created URL (~in Line 100 I added ShowMessage(url) ) and paste it in an external Browser just before CreateOAuthForm(url,nil,nil) is called, I can login and then I get a Token and can access data.

So the Login works with an external browser (I tested with Edge and Firefox) but does not work with AuthBrowser (TWebBrowser) within TCloudBaseWin in the Demo-Programm... 


Back to Top
Bart Holvoet View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2166
Post Options Post Options   Quote Bart Holvoet Quote  Post ReplyReply Direct Link To This Post Posted: 05 Apr 2016 at 10:16am
Hi Thomas,

Can you please make sure the "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js" URL is accessible in the Edige/IE browser?
Depending on your security settings you should be able to add the domain as a trusted site.

To provide a workaround for issues with the TWebBrowser we'll add the possibility to use an external browser for authentication in a future version of the TAdvMyCloudData component.
Back to Top
Feichtenschlager Thomas View Drop Down
Member
Member
Avatar

Joined: 29 Oct 2011
Posts: 73
Post Options Post Options   Quote Feichtenschlager Thomas Quote  Post ReplyReply Direct Link To This Post Posted: 05 Apr 2016 at 11:39am
Hey Bart,

now everything works fine with the demo !!!

On http://www.tmssoftware.com/site/cloudpack.asp?s=faq&show=749 it is said that the FEATURE_BROWSER_EMULATION can be added to HKEY_LOCAL_MACHINE or(!) HKEY_CURRENT_USER.

If it is in HKEY_LOCAL_MACHINE it doesn't work and if I add it to HKEY_CURRENT_USER
everything seems to be fine. No Errors - no external browser needed !

Interesting because all other programs on my machines are located in HKEY_CURRENT_USER and none of them is in HKEY_LOCAL_MACHINE.

Sorry that it took me a while to find this out...

I propose to add this to Nancys FAQ in case it's general.

Thanks a lot for your effort !

Regards, Tom
Back to Top
Davis Jarrod View Drop Down
New Member
New Member
Avatar

Joined: 14 Dec 2010
Posts: 9
Post Options Post Options   Quote Davis Jarrod Quote  Post ReplyReply Direct Link To This Post Posted: 22 Oct 2018 at 10:01pm
I was looking over this thread and noticed the issue with IE. Here is some code that you can use in your projects to force IE to use the latest version. I use it with success in my current projects. Hope someone can find it useful.

Jarrod

-------------------------
procedure UseLatestIEForWebbrowser(aExeFilename: string);
const
  cKey = 'Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION';
var
  Reg: TRegistry;
  AppName: string;
begin
  // Update registry so TWebBrowser can use higest version of IE on system
  AppName := TPath.GetFileName(aExeFilename);
  Reg := TRegistry.Create(KEY_WRITE);
  Reg.RootKey := HKEY_CURRENT_USER;
  if Reg.OpenKey(cKey, True) then
  begin
    Reg.WriteInteger(AppName, 99999);
  end;
  Reg.Free;
end;
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down