Closed ftcaeappno closed 1 year ago
The code you pointed to is in loadLocalStartPage()
. There is also a loadRemoteStartPage()
method which loads the start page read in the bootconfig without prepending anything.
To have that method used, you need to set isLocal
in your bootconfig file to false.
@wmathurin thank you for the prompt response. We'll check and let you know.
Thanks @wmathurin https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin/issues/609#issuecomment-1284577548 fixed the issue.
Thanks for confirming the issue is fixed!
@wmathurin Solution in https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin/issues/609#issuecomment-1284577548 breaks the auth flow when user is opening the app after logged in once. I believe this is because changing isLocal from true to false has other impacts.
Found working solution in PR #605.
@wmathurin any ideas why this PR was closed without merge. I think without changes in this PR this plugin doesnot work with cordova-android:10.x.x. Unless a fix for this already added in another PR.
Creating this ticket since the original (602) was closed. https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin/issues/602
We are developing an app using SalesforceMobileSDK-CordovaPlugin and recently found an issue with Android 9. This is the error we are getting: `I/chromium: [INFO:CONSOLE(0)] "Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.", source: file:///android_asset/www/runtime.js (0)
I/chromium: [INFO:CONSOLE(0)] "Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.", source: file:///android_asset/www/polyfills.js (0)
I/chromium: [INFO:CONSOLE(0)] "Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.", source: file:///android_asset/www/main.js (0)`
This project has cordova-plugin-ionic-webview plugin installed.
After some more debugging I think the issue is in SalesforceDroidGapActivity.java L472 where startUrl is hardcoded to file:///android_asset/www/. So even if cordova-plugin-ionic-webview plugin is installed and https:// is available, webview gets redirected to file:///android_asset/www/.
Then, App shows Blank screen with console error Failed to load module script: The server responded with a non-JavaScript MIME type of "". Strict MIME type checking is enforced for module scripts per HTML spec.", source: file:///android_asset/www/runtime.js