RPC call problem

28 views
Skip to first unread message

129pierre

unread,
Apr 4, 2018, 11:25:31 AM4/4/18
to phonegap
Hi,

My app use rpc call to a remote server for retriving .
 I was abled to make it works, using "PhoneGap desktop" on browser and on my Android phone via PhoneGap App.

I  builded a android apk using the build.phonegap.com site. On the phone, the app is started, the ui is visible, Phonegap is correctly initialized but the RPC call fails with a 404 not found error.


I guess it's a permision problem, so I had :


1) in html : <meta http-equiv="Content-Security-Policy" content="default-src * data: blob: gap: 'unsafe-inline' 'unsafe-eval' ws: wss:;">
2) in config.xml, i have
    <access origin="*" />
in order to access the remote server.

But no way. What's can be possibly wrong ?

Thanks in advance for any help
Pierre
NB : The app is written in GWT and use GWT RPC call

 

jcesarmobile

unread,
Apr 5, 2018, 5:26:50 AM4/5/18
to phonegap
Do you have whitelist plugin installed?

129pierre

unread,
Apr 5, 2018, 12:31:17 PM4/5/18
to phonegap
I was abled to make it work :
in config.xml :

        <plugin name="cordova-plugin-whitelist" spec="~1.3.2" />
        <access origin="*" />

in index.html
<meta http-equiv="Content-Security-Policy"  content="default-src *; 
                  style-src * 'self' 'unsafe-inline' 'unsafe-eval'; 
                  script-src * 'self' 'unsafe-inline' 'unsafe-eval';">

129pierre

unread,
Apr 5, 2018, 12:31:17 PM4/5/18
to phonegap
Thanks, it was the problem.
Reply all
Reply to author
Forward
0 new messages