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 Bundle and APK crash in some devices #1401

Closed
LSLeaff opened this issue Mar 2, 2023 · 4 comments
Closed

Android Bundle and APK crash in some devices #1401

LSLeaff opened this issue Mar 2, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@LSLeaff
Copy link

LSLeaff commented Mar 2, 2023

Description

Hi guys! first of all thanks for this amazing library! We really appreciate your work!

We encounter a strange error in some Android devices and ONLY in app downloaded from Play Store (for now it appears only on arm64, but we are investigating it). It works as excepcted if I run in Debug on a real device and also if I create an apk in release and install it on a real device.

The error generate an exception which lead to a crash as soon as I load the interface which use react-native-skia.

For what we can see the error is that:
dlopen failed: cannot locate symbol “__emutls_get_address” lib/arm64-v8a/libreactskia.so

We are using the following packages versions:
"react": "17.0.1"
"react-native": "0.66.2"
"@shopify/react-native-skia": "0.1.156"

Other info:
ndkVersion = "20.1.5948944"
enableHermes = true

Has anyone ever had this problem?

Version

0.1.156

Steps to reproduce

We are not yet sure about steps to reproduce this issue cause the problem appear only when downloaded from Play Store.

Snack, code example, screenshot, or link to a repository

This is a sample of the code


import React, {useState, useEffect, useRef, useImperativeHandle} from 'react';
import {View} from 'react-native';
import {Skia, Circle, Path, Canvas, useTouchHandler, useValue} from '@shopify/react-native-skia';

const SkiaExample = React.forwardRef((props, ref) => {
  const pathEmpty = Skia.Path.Make();

  return (
    <View
      style={{flex: 1}}>
      <Canvas style={{flex: 1}} onTouch={touchHandler}>
        {pathEmpty !== undefined && (
          <Path
            path={pathEmpty}
            color={minimumTrackColor}
            antiAlias={false}
            style="stroke"
            strokeWidth={strokeWidth}
            strokeCap="round"
          />
        )}
      </Canvas>
    </View>
  );
});
@LSLeaff LSLeaff added the bug Something isn't working label Mar 2, 2023
@LSLeaff LSLeaff changed the title Android Bundle crash in some devices Android Bundle and APK crash in some devices Mar 2, 2023
@chrfalch
Copy link
Contributor

chrfalch commented Mar 4, 2023

Hi, @LSLeaff - could it be related to this issue? android/ndk#1639

@chrfalch
Copy link
Contributor

Closing due to inactivity

@quicksilverr
Copy link

@chrfalch @LSLeaff I'm facing this issue, could you please share any solutions that you have come across?

@LSLeaff
Copy link
Author

LSLeaff commented Oct 26, 2023

Hi @quicksilverr, the problem has been solved by upgrading to the last version of React Native but I'm not 100% sure cause another developer does it. By the way, after that, the crash disappears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants