Comments (15)
I'm also seeing this with Ionic version 8.3.0. I haven't traced everything that's happening, but from a cursory glance it looks like ionic-team/stencil#5933 touched https://github.com/ionic-team/stencil/blob/9ca8951d529efb4926467775f939c305ac07874b/src/runtime/styles.ts#L124, but the exception we now see is coming from https://github.com/ionic-team/stencil/blob/9ca8951d529efb4926467775f939c305ac07874b/src/runtime/styles.ts#L108.
I can trigger this type of error in Chrome, like this:
- Open the developer console on this Github issue page.
body = document.getElementsByTagName('body')[0]
meta = document.getElementsByTagName('meta')[0]
div = document.createElement('div')
body.insertBefore(div, meta)
The line in question in Stencil is (styleContainerNode as HTMLElement).insertBefore(styleElm, referenceNode);
.
That suggests that the exception is happening because at https://github.com/ionic-team/stencil/blob/9ca8951d529efb4926467775f939c305ac07874b/src/runtime/styles.ts#L108, referenceNode
is not a child of styleContainerNode
. It looks like all that code came in recently in ionic-team/stencil#5938.
In this code, if the second path of the ternary operator is taken, and the first <style>
element does not exist within styleContainerNode
, that would trigger the exception.
const preconnectLinks = styleContainerNode.querySelectorAll('link[rel=preconnect]');
const referenceNode =
preconnectLinks.length > 0
? preconnectLinks[preconnectLinks.length - 1].nextSibling
: document.querySelector('style');
I don't know enough about Stencil to know if that's possible. But what about changing it from document.querySelector('style')
to styleContainerNode.querySelector('style')
?
@tanner-reits does that help?
from ionic-framework.
I'm having the same problem with my app in Ionic/Angular. It only happens when I run my app in Chrome. If I run it in Firefox it works without error. No idea what's happening.
from ionic-framework.
Thank you for the issue! I was unable to reproduce this with the same versions listed in ionic info
. I created a new app using the Angular standalone list starter.
Your ionic info
says 8.3.0
but the StackBlitz example is using 8.0.0
. Could you please try to update this version and verify that you are still seeing the problem?
This error should've been resolved by @stencil/[email protected]
and Ionic Framework v8.2.5: #29681 (comment)
from ionic-framework.
Thanks for the issue! This issue has been labeled as needs reproduction
. This label is added to issues that need a code reproduction.
Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue.
For a guide on how to create a good reproduction, see our Contributing Guide.
from ionic-framework.
I did update the version on the stackblitz but maybe it is worth considering the other user saying this is happening only in Chrome. This is an issue happening in both versions of Angular Ionic (8.0.0 and 8.3.0) consider also marking packages in package.json
with ^
normally will install the latest compatible version based on semver, so anything between >=8.0.0 and <9.0.0
If I look in my local project, which is the same as pushed to stackblitz, I also see it is set as ^8.0.0, and this is the project from which I got the ionic info
log. The environment should be the same, but I updated it to be sure as you requested.
Thank you for the issue! I was unable to reproduce this with the same versions listed in
ionic info
. I created a new app using the Angular standalone list starter.Your
ionic info
says8.3.0
but the StackBlitz example is using8.0.0
. Could you please try to update this version and verify that you are still seeing the problem?This error should've been resolved by
@stencil/[email protected]
and Ionic Framework v8.2.5: #29681 (comment)
from ionic-framework.
on safari npm start is failing and not running the app š¤
from ionic-framework.
I can verify that I face the same issue with Chrome. For Brave and Safari, it is working for me.
from ionic-framework.
Hey all, I'm also not having any luck reproducing the issue. I spun up a new app using the Ionic CLI and tested in Chrome, Safari, and Firefox. Also checked out the Stackblitz repro in each browser.
from ionic-framework.
Iām experiencing the same issue and would like to know if there has been any progress or solution to this. Could you please provide an update?
from ionic-framework.
Hey again everyone, I've created a dev build of Ionic using a build of Stencil with the change @masonicboom had suggested. This is kind of a shot in the dark as I still haven't been able to reproduce the issue with Ionic, but thought we'd give it a shot. If anyone can install the build and let us know if that resolves the issue, that would be awesome! The versions are as follows:
@ionic/[email protected]
@ionic/[email protected]
@ionic/[email protected]
@ionic/[email protected]
from ionic-framework.
Related Issues (20)
- bug: Unable to vertically align ion-checkbox using the old or new label syntax when using ion-text-wrap and label text spans multiple lines. HOT 4
- feat: vue v3.5
- bug: [ionic-vue] Incorrect view rendered when using router.go(-n) in linear routing HOT 1
- feat: Expose token generating function
- feat: support srcset on ion-img HOT 2
- bug: [ionic-react] IonInput loses fill and label styles when ion-invalid and ion-touched are added HOT 1
- bug: support react-router newer version like v6 (to avoid Vulnerability reporting)
- bug: ion-menu compatibility with Angular ViewEncapsulation.ShadowDOM
- bug: Focus state at ion-select with interface of action-sheet using TalkBack
- bug: Alerts/dialogs have unnecessary focus boxes with no description when using Android TalkBack
- bug: Alerts/dialog messages cannot be modified using any aria overrides
- bug: aria-label ignored on ion-select-option when using TalkBack
- feat: Extend ion-range CSS shadowparts for individual knob styling with dualKnobs active
- bug: IonInput default autocapitalize value disrespects system keyboard settings and relevant browser defaults
- bug: ion-refresher functionality broken in React + console error HOT 4
- bug: popover arrow changes after scroll to the end of the page
- bug: Inputs with icons are strange
- bug: ion-segment-buttons activating improperly after opening contextmenu (right mouse click) on Mac HOT 1
- feat: Show popover on text input without click event HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ionic-framework.