|
Post by Shradha Volvoikar on Jun 14, 2018 13:42:45 GMT
Hi Team, I have updated Rhostudio from 5.4 to 6.0. After the update, on app load, I started getting an error showing the message as "Error Loading Page". I have to keep http://127.0.0.1:9000/app path running in chrome for the application to work on RhoSimulator. Once the application starts working, suddenly it throws up the error again "Error Loading Page" and when I navigate back and retry it works fine. Can you please help.
|
|
|
Post by Alex Epifanov on Jun 14, 2018 13:53:41 GMT
do you have any logs or output from Chrome debug console?
|
|
|
Post by Shradha on Jun 15, 2018 7:53:35 GMT
I get this error 'QtMainWindow| Page load failed.' in Simulator log.
|
|
|
Post by Shradha on Jun 15, 2018 9:54:42 GMT
I also observed that I get the error when I try to save a record and navigate back to the same page. When app starts, I get below errors in the log:
RhoRuby| require_compiled: error: can not find RhoConnectClient QtMainWindow| Page load failed. RhoRuby| require_compiled: error: can not find cgi/escape QtMainWindow| Page load failed.
|
|
|
Post by Shradha on Jun 15, 2018 10:10:08 GMT
Alex, Also as you mentioned in one thread that "Since in Rhodes 6 we migrated to QT 5.8, Chrome debug tools are available for debugging the app, with more advanced features than old web inspector. Just connect to localhost:9090 from your web browser to open debug tools.".
But I am unable to navigate through the localhost, It just displays the splash screen. And as I said when I refresh the page the simulator starts working but there are no changes or calls done to API or controller methods displayed in the network section of the browser. Can you please provide more information on this?
|
|
|
Post by Super Admin on Jun 15, 2018 10:12:52 GMT
|
|
|
Post by Super Admin on Jun 15, 2018 10:14:53 GMT
If you need fast and reliable support you can obtain one of our support subscriptions. mail to krybas@tau-technologies.com to get more info.
|
|
|
Post by Shradha on Jun 15, 2018 11:27:12 GMT
I have already installed Qt Creator 4.2.1 Based on Qt 5.8.0. How do we use it for debugging?
|
|
|
Post by georgy on Jun 15, 2018 11:43:49 GMT
@shradha Could you please, open localhost:9090 in GOOGLE CHROME? Also, you should add the QTDIR environment variable, if you didn't this. For example, my QTDIR path is C:\Qt\Qt5.8.0\5.8\msvc2015.
|
|
|
Post by Shradha on Jun 15, 2018 12:32:21 GMT
|
|
|
Post by Shradha on Jun 18, 2018 12:13:12 GMT
As I had mentioned initially in this thread that when I start the app, I get an error as "Error Loading Page".
As per my analysis, I found this: * If I navigate using this line of code to the login page it works fine : ApplicationHelper.TakeToControllerAction(redirect(:controller => :Login, :action => :login)) * But, if I use this line of code its throws me the error: WebView.navigate(url_for(:controller => :Login, :action => :login))
This happened only when I updated Rhostudio from 5.4 to 6.0. Can anyone guide on this?
|
|
|
Post by Shradha on Jun 18, 2018 13:51:53 GMT
Please note: Basically ApplicationHelper.TakeToControllerAction(redirect(:controller => :Login, :action => :login)) is a function that has the following implementation WebView.execute_js("SetWindowLocation('#{url}');")
|
|
|
Post by Shradha on Jun 19, 2018 11:43:34 GMT
Also found the below responses on other forums and git link: * WebView.navigate shouldn't be used, in any situation. IOS especially is really slow here (iPhone 4). I know, their documentation is incomplete, especially here. I'd suggest you call your original method, the one which sets up the asynchronous action and callback, through Ajax. Something like $.get('/path/to/action'). Then you are not forced to paint a loading screen. You can use jquerymobile (or other) loading messages. WebView.execute_js could then be used within the callback to clear the loading screen and change the view (use js for this too) Ref: groups.google.com/forum/#!topic/rhomobile/rrH-zyamhpo * Force WebView to navigate to a URL. White page flickering during the transition may happen if a controller action method doesn't return any rendered value, but instead performs a WebView.navigate(someUrl) call. It is important to avoid using WebView.navigate in Ruby action methods because WebView.navigate is intended to be used in callback methods asynchronously. Ref: github.com/rhomobile/rhodes/blob/master/lib/commonAPI/coreapi/ext/webview.xml
|
|