mym0404/react-native-naver-map

[BUG]: In version 0.71, the Android build succeeds but does not run.

Arthur-Noh opened this issue · 2 comments

Is there an existing issue for this?

  • I have searched the existing issues

Version of @mj-studio/react-native-naver-map

1.5.6

Version of react-native

0.71.0

What os are you seeing the problem on?

Android

What device types are you seeing the problem on?

Physcial Device

What architecture types of react native are you seeing the problem on?

Old Architecture(Bridge)

Version of device(android API, iOS OS version, etc...)

Android 33

Expo App

  • I am using Expo

What happened?

안녕하세요. 개발자님
귀하의 패키지 개발 노고에 감사드립니다.

라이브러리를 RN 0.71.0 버전에서 설치하면 안드로이드 빌드는 성공하지만, 앱 구동에 오류가 발생합니다.
Metro 에서는 오류 로그가 보이지 않습니다. 안드로이드 스튜디오로 실행 후 LogCat 을 보면 오류가 다음과 같이 발생합니다.

혹시 해당 라이브러리가 0.71.0 버전에서는 지원되지 않는 것인지 질문합니다.

재현 가능한 프로젝트를 제 리포지토리에 남깁니다.
검토해주시면 감사하겠습니다.

https://github.com/Arthur-Noh/nmapSample

Relevant a package.json.

{
  "name": "mapSample",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "adb": "adb reverse tcp:8081 tcp:8081",
    "android": "react-native run-android --active-arch-only",
    "ios": "react-native run-ios",
    "lint": "eslint .",
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "@mj-studio/react-native-naver-map": "^1.5.6",
    "react": "18.2.0",
    "react-native": "0.71.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/preset-env": "^7.14.0",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^3.0.0",
    "@tsconfig/react-native": "^2.0.2",
    "@types/jest": "^29.2.1",
    "@types/react": "^18.0.24",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.2.1",
    "eslint": "^8.19.0",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "0.73.5",
    "prettier": "^2.4.1",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  },
  "jest": {
    "preset": "react-native"
  },
  "packageManager": "yarn@3.6.4"
}

Relevant log output

> ERROR
Failed to create NativeModule "UIManager"
    java.lang.UnsupportedOperationException
        at java.util.AbstractMap.put(AbstractMap.java:209)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.recursiveMerge(UIManagerModuleConstantsHelper.java:160)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.recursiveMerge(UIManagerModuleConstantsHelper.java:158)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstantsForViewManager(UIManagerModuleConstantsHelper.java:125)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstants(UIManagerModuleConstantsHelper.java:91)
        at com.facebook.react.uimanager.UIManagerModule.createConstants(UIManagerModule.java:246)
        at com.facebook.react.uimanager.UIManagerModule.<init>(UIManagerModule.java:146)
        at com.facebook.react.CoreModulesPackage.createUIManager(CoreModulesPackage.java:195)
        at com.facebook.react.CoreModulesPackage.getModule(CoreModulesPackage.java:160)
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:161)
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:149)
        at com.facebook.react.bridge.ModuleHolder.create(ModuleHolder.java:191)
        at com.facebook.react.bridge.ModuleHolder.getModule(ModuleHolder.java:156)
        at com.facebook.react.bridge.NativeModuleRegistry.getModule(NativeModuleRegistry.java:170)
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:493)
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:469)
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:89)
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:47)
        at com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1241)
        at com.facebook.react.ReactInstanceManager.setupReactContext(ReactInstanceManager.java:1183)
        at com.facebook.react.ReactInstanceManager.access$1600(ReactInstanceManager.java:135)
        at com.facebook.react.ReactInstanceManager$5$2.run(ReactInstanceManager.java:1137)
        at android.os.Handler.handleCallback(Handler.java:958)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loopOnce(Looper.java:230)
        at android.os.Looper.loop(Looper.java:319)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)

> ERROR
ReactInstanceManager caught exception in setupReactContext
    java.lang.UnsupportedOperationException
        at java.util.AbstractMap.put(AbstractMap.java:209)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.recursiveMerge(UIManagerModuleConstantsHelper.java:160)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.recursiveMerge(UIManagerModuleConstantsHelper.java:158)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstantsForViewManager(UIManagerModuleConstantsHelper.java:125)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstants(UIManagerModuleConstantsHelper.java:91)
        at com.facebook.react.uimanager.UIManagerModule.createConstants(UIManagerModule.java:246)
        at com.facebook.react.uimanager.UIManagerModule.<init>(UIManagerModule.java:146)
        at com.facebook.react.CoreModulesPackage.createUIManager(CoreModulesPackage.java:195)
        at com.facebook.react.CoreModulesPackage.getModule(CoreModulesPackage.java:160)
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:161)
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:149)
        at com.facebook.react.bridge.ModuleHolder.create(ModuleHolder.java:191)
        at com.facebook.react.bridge.ModuleHolder.getModule(ModuleHolder.java:156)
        at com.facebook.react.bridge.NativeModuleRegistry.getModule(NativeModuleRegistry.java:170)
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:493)
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:469)
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:89)
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:47)
        at com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1241)
        at com.facebook.react.ReactInstanceManager.setupReactContext(ReactInstanceManager.java:1183)
        at com.facebook.react.ReactInstanceManager.access$1600(ReactInstanceManager.java:135)
        at com.facebook.react.ReactInstanceManager$5$2.run(ReactInstanceManager.java:1137)
        at android.os.Handler.handleCallback(Handler.java:958)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loopOnce(Looper.java:230)
        at android.os.Looper.loop(Looper.java:319)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)

> ERROR
Exception in native call
    java.lang.UnsupportedOperationException
        at java.util.AbstractMap.put(AbstractMap.java:209)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.recursiveMerge(UIManagerModuleConstantsHelper.java:160)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.recursiveMerge(UIManagerModuleConstantsHelper.java:158)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstantsForViewManager(UIManagerModuleConstantsHelper.java:125)
        at com.facebook.react.uimanager.UIManagerModuleConstantsHelper.createConstants(UIManagerModuleConstantsHelper.java:91)
        at com.facebook.react.uimanager.UIManagerModule.createConstants(UIManagerModule.java:246)
        at com.facebook.react.uimanager.UIManagerModule.<init>(UIManagerModule.java:146)
        at com.facebook.react.CoreModulesPackage.createUIManager(CoreModulesPackage.java:195)
        at com.facebook.react.CoreModulesPackage.getModule(CoreModulesPackage.java:160)
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:161)
        at com.facebook.react.TurboReactPackage$ModuleHolderProvider.get(TurboReactPackage.java:149)
        at com.facebook.react.bridge.ModuleHolder.create(ModuleHolder.java:191)
        at com.facebook.react.bridge.ModuleHolder.getModule(ModuleHolder.java:156)
        at com.facebook.react.bridge.NativeModuleRegistry.getModule(NativeModuleRegistry.java:170)
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:493)
        at com.facebook.react.bridge.CatalystInstanceImpl.getNativeModule(CatalystInstanceImpl.java:469)
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:89)
        at com.facebook.react.uimanager.UIManagerHelper.getUIManager(UIManagerHelper.java:47)
        at com.facebook.react.ReactInstanceManager.attachRootViewToInstance(ReactInstanceManager.java:1241)
        at com.facebook.react.ReactInstanceManager.setupReactContext(ReactInstanceManager.java:1183)
        at com.facebook.react.ReactInstanceManager.access$1600(ReactInstanceManager.java:135)
        at com.facebook.react.ReactInstanceManager$5$2.run(ReactInstanceManager.java:1137)
        at android.os.Handler.handleCallback(Handler.java:958)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loopOnce(Looper.java:230)
        at android.os.Looper.loop(Looper.java:319)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:228)

Code of Conduct

  • I agree to follow this project's Code of Conduct

제보 감사합니다. 살펴보도록 하겠습니다.

안드로이드의 native component의 direct event를 정의하는 과정에서 내부에 정의해둔 map 타입이 mutable 하지 않게 설정되어있었고 이것이 이전 버전의 RN에서는 버그가 발생했던 것 같습니다. 1.5.7에 수정되어 출시했습니다. #43.

샘플에서 1.5.7버전에서 정상적으로 구동되는것 확인했습니다.

image

상세한 제보 감사합니다 👍🏻