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: UI crashes at start with "undefined (reading 'slice')" #108

Open
romainourgorry opened this issue Jun 14, 2024 · 3 comments
Open

Bug: UI crashes at start with "undefined (reading 'slice')" #108

romainourgorry opened this issue Jun 14, 2024 · 3 comments

Comments

@romainourgorry
Copy link

romainourgorry commented Jun 14, 2024

Hello,

I'm running Capacitor version 0.4.2.
I tested it from both Brave and Safari browsers, and I have the same behaviour.

When I open the UI it becomes blanks after few seconds and I see this error when I inspect the page:

TypeError: Cannot read properties of undefined (reading 'slice')
    at jr (Kustomization.jsx:107:31)
    at ko (react-dom.production.min.js:167:137)
    at ks (react-dom.production.min.js:290:337)
    at xu (react-dom.production.min.js:280:389)
    at gu (react-dom.production.min.js:280:320)
    at yu (react-dom.production.min.js:280:180)
    at ou (react-dom.production.min.js:271:88)
    at iu (react-dom.production.min.js:268:429)
    at S (scheduler.production.min.js:13:203)
    at MessagePort._ (scheduler.production.min.js:14:128)
dl @ react-dom.production.min.js:189
Show 1 more frame
Show less
react-dom.production.min.js:283 Uncaught TypeError: Cannot read properties of undefined (reading 'slice')
    at jr (Kustomization.jsx:107:31)
    at ko (react-dom.production.min.js:167:137)
    at ks (react-dom.production.min.js:290:337)
    at xu (react-dom.production.min.js:280:389)
    at gu (react-dom.production.min.js:280:320)
    at yu (react-dom.production.min.js:280:180)
    at ou (react-dom.production.min.js:271:88)
    at iu (react-dom.production.min.js:268:429)
    at S (scheduler.production.min.js:13:203)
    at MessagePort._ (scheduler.production.min.js:14:128)

It seems the issue comes from the line 107 in Kustomization.jsx file:

const url = source.spec.url.slice(source.spec.url.indexOf('@') + 1)

Thank you

@romainourgorry romainourgorry changed the title Bug: UI crashes at start Bug: UI crashes at start with "undefined (reading 'slice')" Jun 14, 2024
@romainourgorry
Copy link
Author

romainourgorry commented Jun 14, 2024

I tested it with the version 0.4.0 and I have the same issue

@rouche-q
Copy link

Same here with 0.4.3

@laszlocph
Copy link
Contributor

Can you try with 0.4.4?

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

3 participants