Closed Agular closed 4 months ago
@Agular I tried to reproduce this based on what you have in the summary, but didn't have any issues. When you get a chance, can you put together a reproduction case? Otherwise, we won't be able to verify or root cause the issue.
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 Stencil starter component library 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.
@tanner-reits The team decided that we will probably drop this bug for now. I hope it was not too much of an inconvenience. I will close the issue myself.
Prerequisites
Stencil Version
4.18.2 to 3.4.1
Current Behavior
In Safari (16.X, 17.X) on either Mac or iOS a white screen is shown. Page renders fine on Mac Chrome or on any browser in Windows.
In the console errors this error is thrown:
Unhandled Promise Rejection: ReferenceError: Cannot access uninitialized variable
inindex.js:1867
which refers to https://github.com/ionic-team/stencil/blob/5a82d0152c92f4ad64c0a9dc92dfb5a564a0bdbf/src/runtime/initialize-component.ts#L47Expected Behavior
Page is rendered successfully in Safari. Or a more clear error message of the situation.
System Info
Steps to Reproduce
I sadly do not have a MVP at this time.
Code Reproduction URL
-
Additional Information
I first had this problem with StencilJS 3.4.1 and Ionic 6. Also I thought that PR #5762 would help me debug this situation, but it does not help.
I have tried the following with various results:
1) Updating StencilJS to 4.X and Ionic Framework to 7, did not work. 2) Starting commenting huge chunks of code to get a MVP working state. I have achieved working states with this, but it seems that it kind of does not depend on any specific code, it just depends on how many components are rendered at the same time. I commented out components that I created inside the project. 3) Deploying a dev build to production. This actually works surprisingly, but is not a final solution. My notice is that the files are bundled separately in the build and not bundled together. 4) Configuring bundles in stencil.config.ts to simulate dev build effect by making sure most of the files are bundled separately. This is the current workaround for me, but is not stable since more custom components might reproduce the bug again. 5) Adding browserlist configuration to packages.json with info from Ionic 6/7 migration guide, this did not work. 6) Removing 3rd party dependencies e.g. axios, chart.js, date-fns, leaflet, redux, shepherd.js, swiper
For me it seems odd that the dev build works fine, but not the prod build. Additionally, currently seems that the bundling is the issue, but how?