Access denied message after loading screen on Android

Hi,

I have a user that is receiving a blank page with "Access denied" after the loading screen on Android. See attached screenshot.

Detailed info:

- Android 4.1.2

- Samsung Galaxy S3 (GT-I9305T)

- Carrier: Telstra in Australia

- Rhodes: 3.5.1.12

- Android SDK 4.1

- Android NDK r8c

I personally test my app on a Samsung Galaxy S3 (SCH-R530U) from US Cellular with Android 4.1.2. The app works fine with and without mobile data enabled etc...

I have asked the user to turn off mobile data, to delete and reinstall the app, nothing fixes it.

Here is my build.yml:

name: "Test"

extensions:

  - json

  - rholang

capabilities:

  - gps

  - camera

  - network_state

  - vibrate

env:

  app: "/Users/username/Documents/MobileApps/Test"

sdk: "/Users/username/.rvm/gems/ruby-1.9.3-p327/gems/rhodes-3.5.1.12"

android:

  version: "4.1"

  minSDK: 10

  android_title: 0

  emulator: "Android403"

build: "release"

applog: "rholog.txt"

version: "2.3.1"

sdkversion: "3.5.1.12"

vendor: "vendor"

name: "Test"

Any help would be appreciated.

Thank you,

Nick,

Kutir Mobility
Hi Nicolas,Its difficult to

Hi Nicolas,

Its difficult to debug with the information given by you. Could you ask your user (if feasible) to share some error.log.

You can capture error log using Android DDMS or Device monitor tool.

What exactly you do after loading screen ?

Visnupriya

Kutir Mobility

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Nicolas Hinze
Hi,the user has reported that

Hi,

the user has reported that if the phone is restarted, mobile data is turned off and WIFI is turned on, then the app loads fine. I'm wondering if this has to do with this weird "proxy server" problem Rhodes has. I never encountered it before, but read on the boards about it.

I will try to get the error log, but users are usually not tech savy and can't deal with installing the SDK.

The first screen on the app is a simple JQuery Mobile clickable list view with a native toolbar at the bottom. The app also does an AsynchHttp request to a tiny JSON file to my server to check if there is a new version available.

Thanks,

Nick,

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
That definitely sounds like

That definitely sounds like the proxy problem, the only way to be sure is to have the user check if they have a proxy configured in their APN. If they do have one, have them take a note of the address (to restore it later), remove it and reboot the phone. Strictly speaking, rebooting the phone is not necessary but it will ensure that the app is actually restarted and not just brought to the foreground.

Let us know the result of this test and we'll take it from there.

Javier

Kutir Mobility

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Nicolas Hinze
Javier,user had a proxy setup

Javier,

user had a proxy setup in APN. User removed the proxy and app loaded fine.

Is there some fix I can test/apply to Rhodes source code? User is willing to help test.

Thanks,

Nick,

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
Try this: in your rhodes gem,

Try this: in your rhodes gem, find open platform/shared/common/RhodesApp.cpp and in (or around) line 1357 you should find:

#if defined( __SYMBIAN32__ ) || defined( OS_ANDROID )

    m_strHomeUrl = "http://localhost:";

#elif defined( OS_WINCE ) && !defined(OS_PLATFORM_MOTCE)

....

remove "|| defined( OS_ANDROID )", save the file and rebuild your application. RhodesApp.cpp should look like this:

#if defined( __SYMBIAN32__ )

    m_strHomeUrl = "http://localhost:";

#elif defined( OS_WINCE ) && !defined(OS_PLATFORM_MOTCE)

I have added the patch to a clone of the rhodes repository here:

Workaround issue where Android is not able to load page from localhost i... ·  93641c7 · javiermolina1234/rhodes · GitHu…

If you prefer not to touch your gems, you can clone my repository and checkout the "proxyfix" branch with

git clone -b proxyfix https://github.com/javiermolina1234/rhodes.git

you will have to copy your rhobuild.yml file into wherever you clone the repo and set sdk in your build.yml

Test it and let me know that works for your user

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Nicolas Hinze
Kutir,my user reports that

Kutir,

my user reports that this fix solves the problem. Thank you.

Will this fix be incorporated into Rhodes 4.0 ?

Thanks,

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
I have sent a pull request

I have sent a pull request for 3.5 stable, if the RhoMobile team accepts it and applies the fix, I suppose they will port it to 4.0 also, as it will be needed there too

Javier

Kutir Mobility

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments