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

Since 3.4.5: Android 4.4 device throws TypeError on load #720

Closed
vikingair opened this issue Dec 6, 2019 · 10 comments
Closed

Since 3.4.5: Android 4.4 device throws TypeError on load #720

vikingair opened this issue Dec 6, 2019 · 10 comments

Comments

@vikingair
Copy link

I want to report a bug, that I encountered recently when testing my application on an eInk-Reader-Device which runs basically like some Android 4.4 device.

I was able to detect that the issue belongs to [email protected]. Everything works with [email protected] but all later versions of core-js stopped working.

The stack trace of the error might be partially helpful:

TypeError: Cannot convert undefined or null to object
  at hasOwnProperty (native)
  at b.exports (...)
  at b.exports.exportTypedArrayMethod (...)
  at Object.<anonymous> (...)

Sadly I have no clue why the issue occurs. I tried to understand what happened within the 6 commits from version 3.4.4 to 3.4.5, but could not catch up quickly enough.

Please help me to resolve this issue since I want to keep the core-js dependency always up-to-date.

I'm willing to test all patches/fixes on the device as soon as possible. Please tell me if you need any additional information. Thank you! 👍

@zloirock
Copy link
Owner

zloirock commented Dec 6, 2019

I don't see any changes between 3.4.4 and 3.4.5 which can affect it.

@zloirock
Copy link
Owner

zloirock commented Dec 6, 2019

It can be related to #648.

@vikingair
Copy link
Author

Issue #648 seems to fit quite well. We're using create-react-app too. Sorry for creating a new issue.

@zloirock
Copy link
Owner

zloirock commented Dec 7, 2019

(all tests passed on the Android 4.4 emulator)
Снимок экрана 2019-12-07 в 06 47 34

@vikingair
Copy link
Author

Hi @zloirock

I was able to build some application where you can reproduce the problem.

Repo: https://github.com/fdc-viktor-luft/cra-test
Hosted: https://fdc-viktor-luft.github.io/cra-test/ (you should see a success prompt and the React logo - if it fails, you should the stack trace in some prompt)

While building this example I had the following insights:

When using create-react-app initial setup and adding the two lines

import 'core-js/stable';
import 'regenerator-runtime/runtime';

to the index.tsx everything works with [email protected]. But after changing the Minimizer from terser-webpack-plugin to webpack-closure-compiler (see config-overrides.js) the loading of the app fails. This is currently hosted example. The prompted stack trace is similar as mentioned above.

But the combination of create-react-app, webpack-closure-compiler and [email protected] works perfectly.

Hopefully the hosted example can help you, to help me 😀

Btw. we have to use the closure comiler because we need ECMAScript 3 for some Android 2 devices. 😭

@zloirock
Copy link
Owner

zloirock commented Jan 10, 2020

I will not have a chance to explore it in Android 4.4 shortly, so marked as help wanted.

@davidsteinberger
Copy link

I just ran into a similar issue. Debugged it for some time to find out that it was caused by a combination of webpack and babel (w/ core-js polyfills). Fixed it as described in #743 (comment).

@vikingair
Copy link
Author

Thanks for your suggestion. I will try to fix it as soon as I'm able to get my hands on that Android device again. But this can take some time, since I'm working currently from home like probably most of you do 😉

@zloirock
Copy link
Owner

zloirock commented Apr 7, 2021

It looks like that the reason has been figured out.

@zloirock zloirock closed this as completed Apr 7, 2021
@vikingair
Copy link
Author

@magWagner If you're still effected by this issue. Here you can probably find a solution following the above suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants