Hi,
trying the new 2.50 Beta 2 on Windows, using JDK 11 from Microsoft or Amazon I can compile now, but the HTTPRequest no longer can load data using unsecured http:// but only with https://
I think I read somewhere about security improvements in Cordova, Java etc.?
With 2.50B2 my Android apps no longer can connect to my in PB written app server, so I hope this can be fixed asap, because now I can't test anything of the app with the new SB version....
Greets, hoerbie
2.50/2.51b1 Android apk, http no longer works
2.50/2.51b1 Android apk, http no longer works
Last edited by hoerbie on Thu Oct 12, 2023 6:23 pm, edited 3 times in total.
Re: 2.50B2 Android apk, http no longer works
I will investigate this, thanks
Re: 2.50 Android apk, http no longer works
@Fred: Problem not solved in 2.50?
My app still can't communicate with my PB-server using http.
One other app using https to a normal Apache/PHP web server works.
My app still can't communicate with my PB-server using http.
One other app using https to a normal Apache/PHP web server works.
Re: 2.50 Android apk, http no longer works
Hi Fred,
I researched and tried a lot, and maybe the problem is in a change in Cordova, old Cordova versions started SBs code like file:///android_asset/www/index.html, but since cordova-android v10.x.x the way was changed to a new WebViewAssetLoader, and it is started from https://localhost/...
In the browser there are security features, that no http request can be done, when the main request was done with https.
See https://cordova.apache.org/announcement ... 0.1.0.html and https://www.mathew-paul.nz/posts/cordov ... protocols/
Maybe it would help to add the following line to the config.xml
Until now I didn't had the time to try it myself with changes in the "keep temp dir", because I couldn't get the Cordova build running there from command prompt.
For the future it would be helpful, when the config.xml wasn't hardcoded in the sbcompiler.exe, but as normal file in the compile dir, so it would be changeable by the SB users.
Or maybe you can integrate a "wait" function in the compile dialog, that SB stops before the Cordova build, so that the SB user can change something in the temp dir, and then resume with the create app in SB?
By the way: the above could also be the problem of other bug report viewtopic.php?t=2418
I researched and tried a lot, and maybe the problem is in a change in Cordova, old Cordova versions started SBs code like file:///android_asset/www/index.html, but since cordova-android v10.x.x the way was changed to a new WebViewAssetLoader, and it is started from https://localhost/...
In the browser there are security features, that no http request can be done, when the main request was done with https.
See https://cordova.apache.org/announcement ... 0.1.0.html and https://www.mathew-paul.nz/posts/cordov ... protocols/
Maybe it would help to add the following line to the config.xml
Code: Select all
<preference name="scheme" value="http" />
For the future it would be helpful, when the config.xml wasn't hardcoded in the sbcompiler.exe, but as normal file in the compile dir, so it would be changeable by the SB users.
Or maybe you can integrate a "wait" function in the compile dialog, that SB stops before the Cordova build, so that the SB user can change something in the temp dir, and then resume with the create app in SB?
By the way: the above could also be the problem of other bug report viewtopic.php?t=2418
Re: 2.50 Android apk, http no longer works
Looks like a good find, i will implement it and let you know !
Re: 2.50 Android apk, http no longer works
Sorry Fred, http still doesn't work in my apps.
With 2.51 Beta 1 we are one step further, because now I see in my PB server an "OPTIONS /path/file..." connect from the app, but after this no real GET or POST comes through.
So the CORS preflight now comes through, but maybe the with SB 2.40 working answer of my server
isn't enough secure or specific.
I found some other things that maybe need a change in SB compile, but I will have to sort them out, and will post here after the weekend.
With 2.51 Beta 1 we are one step further, because now I see in my PB server an "OPTIONS /path/file..." connect from the app, but after this no real GET or POST comes through.
So the CORS preflight now comes through, but maybe the with SB 2.40 working answer of my server
Code: Select all
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: *
Access-Control-Allow-Headers: *
I found some other things that maybe need a change in SB compile, but I will have to sort them out, and will post here after the weekend.
Re: 2.50/2.51b1 Android apk, http no longer works
Ok, looking forward to it, it seemed to work here on my tests.