You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/02/22 21:46:14 UTC

[GitHub] [cordova-ios] tylervz opened a new issue #1080: Issues on iOS 12 for apps using OpenUI5

tylervz opened a new issue #1080:
URL: https://github.com/apache/cordova-ios/issues/1080


   # Bug Report
   
   ## Problem
   
   Since upgrading to cordova-ios 6.2.0 from 5.1.1 I'm facing several issues when running my app, which uses the [OpenUI5 framework](https://openui5.org/releases/), on iOS 12. I have created a sample app to demonstrate the issues:
   
   https://github.com/tylervz/ui5-cordova-ios-sample-app
   
   ### What is expected to happen?
   
   Launch the app on an iOS device (emulator or actual device) running iOS 12.4. I believe the issues would happen with any 12.x version of iOS; 12.4 is highest so I've been testing with that on an emulator.
   
   Press the Show Today's Date button. Instead of showing a toast with today's date, the page appears to refresh. This is the [JavaScript line](https://github.com/tylervz/ui5-cordova-ios-sample-app/blob/1f9861f681fdae250cd77a0f499d99d0cfdc0420/www/controller/Home.controller.js#L186-L188) that's not executing as expected:
   ```
   DateFormat.getDateTimeInstance({ pattern: "yyyy-MM-dd HH:mm:ss.S" });
   ```
   
   Press the Filter icon button at the top right of the home page.
   Instead of showing the Dialog with a `sap.m.DatePicker`, the page appears to refresh.
   If you were to remove the `DatePicker` from the dialog and the corresponding code in the controller, the dialog would open fine on iOS 12.
   
   Press the Go To Detail Page button. The app crashes rather than showing the page with a `sap.ui.unified.Calendar`.
   
   If you run the app on Android or a different iOS version, the app behaves as expected (with a couple exceptions noted in my README for iOS 11).
   Additionally, if you checkout the `working` branch, you can run the app on iOS 12.4 and navigate to the Detail Page without the app crashing because the page does not have the `sap.ui.unified.Calendar` control on it.
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   Clone my sample app.
   
       git clone git@github.com:tylervz/ui5-cordova-ios-sample-app.git
       cd ui5-cordova-ios-sample-app
       cordova plaftorm add ios
       cordova build ios
       open platforms/ios/HelloWorldUI5.xcodeproj
   
   Then run the application from XCode using an emulator running iOS 12.4
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   
   The app displays issues on an iOS 12.4 iPhone 8 emulator.
   
   However it runs fine on the following devices:
   iOS 11.3 iPhone 8 emulator
   iOS 13.5 iPhone 8 emulator
   iOS 14.4 iPhone 8 emulator
   Android 8.0.0 (Samsung Galaxy S7) with Chrome 84.0.4147.125 (OK).
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   OpenUI5 version: 1.80.0
   Cordova version: 10.0.0
   cordova-ios version: 6.2.0
   macOS 10.15.7
   Xcode 12.4
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] breautek commented on issue #1080: Issues on iOS 12 for apps using OpenUI5

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #1080:
URL: https://github.com/apache/cordova-ios/issues/1080#issuecomment-783738533


   This doesn't appear to be a cordova bug. So I'll be closing this issue.
   
   I tried clicking on "Show Today's Date" which produces the following error:
   
   ```
   failed to load JavaScript resource: sap/ui/demo/basicTemplate/Component-preload.js -  sap.ui.ModuleSystem
   ```
   
   There is no `sap` folder, let alone a path that looks like that in your bundled resources.
   
   There are several other similar errors as well, such as failing to load:
   
   ```
   app://localhost/i18n/i18n_en_US.properties
   ```
   
   which again, there is no such file in your asset bundle. There is a `/i18n/i18n.properties` however.
   
   If I click on `Open Details Page`, it goes into an endless loop, also related to it trying to load a file that doesn't exist or isn't bundled in your web assets.
   
   My best advice is to ensure that everything is copied into your `www` folder as required by the framework.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] tylervz commented on issue #1080: Issues on iOS 12 for apps using OpenUI5

Posted by GitBox <gi...@apache.org>.
tylervz commented on issue #1080:
URL: https://github.com/apache/cordova-ios/issues/1080#issuecomment-785278715


   Thank you for taking the time to look into this @breautek .
   
   The following error
   ```
   failed to load JavaScript resource: sap/ui/demo/basicTemplate/Component-preload.js -  sap.ui.ModuleSystem
   ```
   is actually produced before you click on "Show Today's Date"; it's produced when the applications loads. That error is present even when the application is running without an issue, as you can see when running the app on iOS 14. OpenUI5 by default attempts to load a preload file before fetching individual controller and view files, but it does not need a preload file to run.
   
   
   Likewise, with the similar error of this resource request failing to load with a 404:
   
       app://localhost/i18n/i18n_en_US.properties
   
   That error is present even when the application is running without an issue (on iOS 14) because OpenUI5 attempts to load the most specific i18n file it can for the user and then falls back to `/i18n/i18n.properties`. `/i18n/i18n.properties` is successfully being used by the app to provide translations of text.
   
   I agree that the issues documented in my sample app are most likely due to the application trying to load a file that doesn't exist or isn't bundled in the web assets; it's just not clear which specific file is the issue, since it cannot be the ones mentioned above. And it's also puzzling why the app is able to load this file when running on iOS 11, 13 and 14.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] tylervz commented on issue #1080: Issues on iOS 12 for apps using OpenUI5

Posted by GitBox <gi...@apache.org>.
tylervz commented on issue #1080:
URL: https://github.com/apache/cordova-ios/issues/1080#issuecomment-802141376


   I want to follow up here in case anybody else experiences the same issues I was running in to. As I [explained in the GitHub issue I opened with OpenUI5](https://github.com/SAP/openui5/issues/3173#issuecomment-802135977), I discovered that loading OpenUI5 from the CDN (rather than loading it from local files) resolves all the issues I was having in the Cordova app.
   
   ```
   <script id="sap-ui-bootstrap"
       src="https://openui5.hana.ondemand.com/1.85.4/resources/sap-ui-core.js"
       data-sap-ui-theme="sap_fiori_3"
       data-sap-ui-resourceroots='{
           "sap.ui.demo.basicTemplate": "./"
       }'
       data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
       data-sap-ui-compatVersion="edge"
       data-sap-ui-async="true"
       data-sap-ui-frameOptions="trusted">
   </script>
   ```
   On the `cdn` branch of my sample application, you can run it and see for yourself. So the solution we're going to use in our actual app is to add the `sap-ui-bootstrap` script tag dynamically with JavaScript when deviceready fires. If the app is running on iOS 12, we will set `src` to the CDN i.e. `"https://openui5.hana.ondemand.com/1.85.4/resources/sap-ui-core.js"` and otherwise we will set `src` to a local `sap-ui-core.js` file.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] tylervz edited a comment on issue #1080: Issues on iOS 12 for apps using OpenUI5

Posted by GitBox <gi...@apache.org>.
tylervz edited a comment on issue #1080:
URL: https://github.com/apache/cordova-ios/issues/1080#issuecomment-802141376


   I want to follow up here in case anybody else experiences the same issues I was running in to. As I [explained in the GitHub issue I opened with OpenUI5](https://github.com/SAP/openui5/issues/3173#issuecomment-802135977), I discovered that loading OpenUI5 from the CDN (rather than loading it from local files) resolves all the issues I was having in the Cordova app.
   
   ```
   <script id="sap-ui-bootstrap"
       src="https://openui5.hana.ondemand.com/1.85.4/resources/sap-ui-core.js"
       data-sap-ui-theme="sap_fiori_3"
       data-sap-ui-resourceroots='{
           "sap.ui.demo.basicTemplate": "./"
       }'
       data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
       data-sap-ui-compatVersion="edge"
       data-sap-ui-async="true"
       data-sap-ui-frameOptions="trusted">
   </script>
   ```
   On the `cdn` branch of my sample application, you can run it and see for yourself. So the solution we're going to use in our actual app is to add the `sap-ui-bootstrap` script tag dynamically with JavaScript when deviceready fires. If the app is running on iOS 12, we will set `src` to the CDN i.e. `"https://openui5.hana.ondemand.com/1.85.4/resources/sap-ui-core.js"` and otherwise we will set `src` to a local `sap-ui-core.js` file.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-ios] breautek closed issue #1080: Issues on iOS 12 for apps using OpenUI5

Posted by GitBox <gi...@apache.org>.
breautek closed issue #1080:
URL: https://github.com/apache/cordova-ios/issues/1080


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org