question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Capacitor] TypeError: Cannot read property 'data' of undefined

See original GitHub issue

Describe the bug image

This happens the second time when I build the app. It seems something goes wrong with the rebuild command?

The only workaround is to remove the src-capacitor and start over.

Codepen/jsFiddle/Codesandbox (required) Codepen is going to be difficult for mobile. It does work fine when simple running it from a browser (SPA).

To Reproduce Steps to reproduce the behavior:

  1. cd project/src-capacitor
  2. quasar build -m capacitor -T android --ide
  3. Install apk to device
  4. See error

The APK doesn’t install at all when running without --ide. Also it doesn’t open Android Studio, I need to open it manually.

Expected behavior Build without the vendor error.

Screenshots See Describe the bug

Platform (please complete the following information): OS: Arch Linux Node: v14.8.0 NPM: 6.14.7 Yarn: N/A Browsers: Brave iOS: N/A Android: S9 - Android 10 Electron: N/A

Additional context No build errors, only when running.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
rstoenescucommented, Aug 24, 2020

Yes, you need it. It’s the actual native app that wraps everything for Android. When building for iOS, an ios folder will also appear there. Same goes for Cordova too. But you first need to dev/build for that platform in order for those folders to show up. I recommend sticking with Capacitor for a whole lot of reasons.

1reaction
rstoenescucommented, Aug 23, 2020

Hi,

  1. js/24.js is a devland chunk. That’s the place where the error is reported.
  2. Android Studio is opened only if its executable is part of your PATH, otherwise there’s no way that Quasar can detect where it actually lies.
  3. Doesn’t makes any sense for a rebuild to break something.

Can you try to “quasar build -m capacitor -d” (-d is for debug) and check the log again to see where the error actually happens pls? If error is not from devland (don’t think so by looking at the reported chunk) then is it possible for you to offer a reproducing repo (or upload a zip here – without node_modules in it)?

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read property 'data' of undefined - can't ...
I don't think I'm doing anything wrong with my naming as it works fine at higher levels in the object e.g. console.
Read more >
Cannot read property 'showActions' of undefined - Ionic Forum
In Capacitor 3, Modals is now ActionSheet and Dialog. Help please? ... [SOLVED] TypeError: Cannot read property 'showActions' of undefined.
Read more >
TypeError: Cannot read property 'data' of undefined
catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/ ...
Read more >
magento 2 Uncaught TypeError: Cannot read property 'data' of ...
It sounds like the element [data-gallery-role=gallery-placeholder] does not exist on the page, therefore element is undefined here:
Read more >
cannot read property of undefined typescript
TypeError : Cannot read property 'data' of undefined I am testing though ... fix Yup cannot read property object of undefined. create "capacitor"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found