Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: stencil components not showing on cordova iOS 15.4 #3371

Closed
3 tasks done
frans26 opened this issue May 19, 2022 · 4 comments
Closed
3 tasks done

bug: stencil components not showing on cordova iOS 15.4 #3371

frans26 opened this issue May 19, 2022 · 4 comments

Comments

@frans26
Copy link

frans26 commented May 19, 2022

Prerequisites

Stencil Version

2.15.2

Current Behavior

Stencil component won't show using cordova run ios on simulator iOS 15.4.

Works using cordova run browser. Tested on both Google Chrome v101.0.4951.64 and Safari v15.4 (17613.1.17.1.13).

Works using cordova run android.

Expected Behavior

Stencil components should work on cordova iOS app.

Steps to Reproduce

I have created a base cordova and stencil app. https://github.com/bluethunder626/cordova-app

blue-components folder is the stencil components folder and the root folder is the cordova app.

I have put all the build from stencil on root www/build folder. www/index.html is also updated with the stencil build import.

stencil 2.15.2
cordova-ios 6.2.0
ios 15.4

  1. npm install -g cordova
  2. cordova platform add ios
  3. cordova run ios

Code Reproduction URL

https://github.com/bluethunder626/cordova-app

Additional Information

I have tried the following issues but didn't work for me:

#2392
#1900

@ionitron-bot ionitron-bot bot added the triage label May 19, 2022
@rwaskiewicz
Copy link
Contributor

Hey @bluethunder626 👋

Thanks for the detailed bug report and simple repro case!

Can you help me out a little bit here? Can you provide any errors you see? If there aren't any, can you provide me with any debugging statements you've used? That should help us narrow this problem down. Thanks!

@rwaskiewicz rwaskiewicz added Awaiting Reply This PR or Issue needs a reply from the original reporter. and removed triage labels May 19, 2022
@frans26
Copy link
Author

frans26 commented May 19, 2022

Hi @rwaskiewicz ,

Thank you for the reply.

This is the error that I have encountered.

file:///[.....]/HelloCordova.app/www/build/blue-components.esm.js
Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin. Status code: 0

I have not used any debugging statements as of the moment.

@ionitron-bot ionitron-bot bot removed the Awaiting Reply This PR or Issue needs a reply from the original reporter. label May 19, 2022
@rwaskiewicz
Copy link
Contributor

@bluethunder626 I believe you can fix this by adding the following to your config.xml file:

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>HelloCordova</name>
    <description>Sample Apache Cordova App</description>
    <author email="dev@cordova.apache.org" href="https://cordova.apache.org">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
+   <preference name="scheme" value="app" />
</widget>

@rwaskiewicz rwaskiewicz added the Awaiting Reply This PR or Issue needs a reply from the original reporter. label May 19, 2022
@frans26
Copy link
Author

frans26 commented May 19, 2022

Hi @rwaskiewicz ,

This works now. Thank you for the help!

@frans26 frans26 closed this as completed May 19, 2022
@ionitron-bot ionitron-bot bot removed the Awaiting Reply This PR or Issue needs a reply from the original reporter. label May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants