victory icon indicating copy to clipboard operation
victory copied to clipboard

App crashes on victory-native iOS on specific versions. TypeError: undefined is not a function (near '...Object.fromEntries...')

Open AliZaib-Emumba opened this issue 2 years ago • 2 comments

I am getting this error at victory-chart for iOS version 11.4. On other versions it is working fine. The app crashes as soon as the screen is loaded with the chart and displays the following error.

TypeError: undefined is not a function (near '...Object.fromEntries...')

This error is located at:
    in VictoryChart (created by VictoryChart)
.
.
.

I have updated to the latest version and tried re-installing the module but still no change observed.

AliZaib-Emumba avatar May 31 '22 08:05 AliZaib-Emumba

hey @AliZaib-Emumba 👋🏻 please can you provide a reproduction / chart code sample for this?

it looks like this might be a bug in victory-core as that's the only place we use Object.fromEntries()

i'm not sure whether that's supported or not in react-native -- it may be that we just need an extra polyfill or to use core-js or something

jpdriver avatar Jun 04 '22 17:06 jpdriver

For me it is happening in Android. I just installed the library and then after running seeing this issue.

babyg-neel avatar Aug 17 '22 10:08 babyg-neel

Happening for us in this setup:

  • react-native 0.66.4
  • victory 36.6.8
  • iOS 12.1, iPhone 8

Using VictoryAxis, VictoryLabel, VictoryTooltip, VictoryBar, VictoryChart, VictoryContainer

Not happening on iOS 12.3, iPhone XS

Upd: ulso happening on iPhone 7 Plus, 5s, all with iOS 12.1.4

antonandreyev avatar Oct 17 '22 14:10 antonandreyev

also happening in android

kiranojhanp avatar Nov 11 '22 12:11 kiranojhanp

Update: Use this package for the fix

https://www.npmjs.com/package/polyfill-object.fromentries

kiranojhanp avatar Nov 16 '22 06:11 kiranojhanp

This issue is stale because it has been open for 90 days with no activity. If there is no activity in the next 7 days, the issue will be closed.

github-actions[bot] avatar Mar 02 '24 00:03 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.

github-actions[bot] avatar Mar 09 '24 01:03 github-actions[bot]