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

Android crashes after install #2491

Closed
KorelogicSte opened this issue Oct 16, 2024 · 3 comments
Closed

Android crashes after install #2491

KorelogicSte opened this issue Oct 16, 2024 · 3 comments
Labels
Missing repro This issue need minimum repro scenario

Comments

@KorelogicSte
Copy link

Description

Followed the install steps, and installed react-native-svg-transformer following their steps. iOS works fine and the SVG appears but for Android the app just closes, no error is given in the bundler. So had to use adb logcat and I get:

10-16 12:07:21.688 16778 16778 E AndroidRuntime: Process: com.redbox.management, PID: 16778
10-16 12:07:21.688 16778 16778 E AndroidRuntime: java.lang.IllegalArgumentException: No enum constant com.horcrux.svg.TextProperties.FontStyle.condensed
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at java.lang.Enum.valueOf(Enum.java:300)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.TextProperties$FontStyle.valueOf(TextProperties.java:91)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.FontData.<init>(FontData.java:193)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.GlyphContext.pushNodeAndFont(GlyphContext.java:170)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.GlyphContext.pushContext(GlyphContext.java:213)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.TextView.pushGlyphContext(TextView.java:208)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.TextView.getGroupPath(TextView.java:197)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.TextView.draw(TextView.java:134)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.RenderableView.render(RenderableView.java:442)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.GroupView.drawGroup(GroupView.java:135)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.GroupView.draw(GroupView.java:91)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.RenderableView.render(RenderableView.java:442)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.GroupView.drawGroup(GroupView.java:135)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.GroupView.draw(GroupView.java:91)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.RenderableView.render(RenderableView.java:442)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.SvgView.drawChildren(SvgView.java:335)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.SvgView.drawOutput(SvgView.java:281)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.horcrux.svg.SvgView.onDraw(SvgView.java:134)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.draw(View.java:24627)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23493)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.draw(View.java:24357)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4576)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.facebook.react.views.view.ReactViewGroup.drawChild(ReactViewGroup.java:882)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4337)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.facebook.react.views.view.ReactViewGroup.dispatchDraw(ReactViewGroup.java:855)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23484)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.draw(View.java:24357)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.drawChild(ViewGroup.java:4576)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4337)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.draw(View.java:24630)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.widget.ScrollView.draw(ScrollView.java:2019)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at com.facebook.react.views.scroll.ReactScrollView.draw(ReactScrollView.java:644)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23493)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.688 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4560)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4533)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.View.updateDisplayListIfDirty(View.java:23449)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:694)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:700)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:798)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewRootImpl.draw(ViewRootImpl.java:5313)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4975)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:4093)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2718)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9937)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1406)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1415)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:1015)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:945)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1389)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:959)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:100)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:232)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:317)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8592)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
10-16 12:07:21.690 16778 16778 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)```

### Steps to reproduce

1. npx react-native init
2. npm i `react-native-svg`
3. npm i `react-native-svg-transformer`
4. Follow both setup steps

### Snack or a link to a repository

https://github.com/kristerkari/react-native-svg-transformer#installation-and-configuration

### SVG version

15.5.0

### React Native version

0.75.4

### Platforms

Android

### JavaScript runtime

None

### Workflow

None

### Architecture

None

### Build type

None

### Device

None

### Device model

_No response_

### Acknowledgements

Yes
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Oct 16, 2024
@KorelogicSte
Copy link
Author

KorelogicSte commented Oct 16, 2024

I can't produce a repo.

I have removed the react-native-svg-transformer and I still get the same crash:
SVG file is:
export const Logo = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="88" height="91" viewBox="0 0 88 91"> <defs> <path id="a" d="M16.284 8.716h24a8 8 0 0 1 8 8v24a8 8 0 0 1-8 8h-24a8 8 0 0 1-8-8v-24a8 8 0 0 1 8-8z"/> </defs> <g fill="none" fill-rule="evenodd"> <use fill="#FF3B4C" xlink:href="#a"/> </g> </svg>`;

@KorelogicSte KorelogicSte closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2024
@DavitVosk
Copy link

I used older version to avoid this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario
Projects
None yet
Development

No branches or pull requests

2 participants