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

Error when trying MicroService.start() with version 0.6.^ On Android in flutter. #140

Closed
cashdow opened this issue Nov 20, 2019 · 1 comment

Comments

@cashdow
Copy link

cashdow commented Nov 20, 2019

LiquidCore : 0.6.0, 0.6.2
Android targetSDkVersion, compileSdkVersion 28
Flutter version : 1.6.3 ~ 1.9.1 (I tested all version..)
Environment : Galaxy Note FE. Pi version

I'm do not using a flutter liquidCore library.
I have been used LiquidCore Android library in flutter.

I checked that It ran on Android with LiquidCore Android library.
But It occurred a problem within Android in Flutter with Using same LiquidCore Android library

I am so confused. Is this a crash between flutter and liquidCore?

Here is error and Android kotlin source in flutter.

     val readyListener = EventListener { service, event, payload ->
          service.emit("ping")
      }

      val pongListener = MicroService.EventListener { service, event, payload ->
        // NOTE: This event is typically called inside of the micro service's thread, not
        // the main UI thread.  To update the UI, run this on the main thread.
        Handler(Looper.getMainLooper()).post {
          try {
          } catch (e: Throwable) {
            e.printStackTrace()
          }
        }
      }

      // Our start listener will set up our event listeners once the micro service Node.js
      // environment is set up
      val startListener = MicroService.ServiceStartListener { service  ->
        service.addEventListener("ready", readyListener)
        service.addEventListener("pong", pongListener)
      }

      val uri = URI.create("android.resource://io.gemore.channel_test/raw/liquidcore_sample")
      service = MicroService(this@MainActivity, uri, startListener)
      service?.start()

(liquidcore_sample.js file is quite simple

console.log('~~~')
setInterval(function() {}, 5000)
)

It was occurred after service?.start() invoked

E/libc++abi(20669): terminating
F/libc (20669): Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 20734 (nodejs), pid 20669 (re.channel_test)


Build fingerprint: 'samsung/gracerltektt/gracerltektt:9/PPR1.180610.011/N935KKKU4CSI1:user/release-keys'
Revision: '17'
ABI: 'arm64'
pid: 20669, tid: 20734, name: nodejs >>> io.gemore.channel_test <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'terminating'
x0 0000000000000000 x1 00000000000050fe x2 0000000000000006 x3 0000000000000008
x4 fefeff75ff666d68 x5 fefeff75ff666d68 x6 fefeff75ff666d68 x7 7f7f7f7f7f7f7f7f
x8 0000000000000083 x9 00000077f407b888 x10 fffffff87ffffbdf x11 0000000000000001
x12 0000000000000018 x13 000000005dd5065d x14 000d1cdc0f42d228 x15 00009cca122580ce
x16 00000077f40b2290 x17 00000077f3ff1920 x18 0000000000000000 x19 00000000000050bd
x20 00000000000050fe x21 0000000000000083 x22 ffffff80ffffffc8 x23 000000773ccbc290
x24 000000773ccbc170 x25 000000773ccbc1b0 x26 00000077f40bb000 x27 0000000000000018
x28 000000000000006c x29 000000773ccbc0e0
sp 000000773ccbc0a0 lr 00000077f3fe4d68 pc 00000077f3fe4d94
backtrace:
#00 pc 0000000000021d94 /system/lib64/libc.so (abort+124)
#1 pc 0000000000e97de0 /data/app/io.gemore.channel_test-p_OBwFOxmUZ1MywtAn2d0Q==/lib/arm64/libnode.so
#2 pc 0000000000e97e60 /data/app/io.gemore.channel_test-p_OBwFOxmUZ1MywtAn2d0Q==/lib/arm64/libnode.so
#3 pc 0000000000e94d24 /data/app/io.gemore.channel_test-p_OBwFOxmUZ1MywtAn2d0Q==/lib/arm64/libnode.so
#4 pc 0000000000e94cd0 /data/app/io.gemore.channel_test-p_OBwFOxmUZ1MywtAn2d0Q==/lib/arm64/libnode.so (std::terminate()+72)
#5 pc 0000000000e92288 /data/app/io.gemore.channel_test-p_OBwFOxmUZ1MywtAn2d0Q==/lib/arm64/libnode.so (std::__ndk1::thread::~thread()+20)
#6 pc 0000000000087d44 /system/lib64/libc.so (__cxa_finalize+196)
#7 pc 000000000001c698 /system/lib64/libc.so (exit+24)
#8 pc 00000000000809d4 /data/app/io.gemore.channel_test-p_OBwFOxmUZ1MywtAn2d0Q==/lib/arm64/libliquidcore.so (FatalException(v8::Isolate*, v8::Localv8::Value, v8::Localv8::Message)+356)
#9 pc 0000000000bbd420 /data/app/io.gemore.channel_test-p_OBwFOxmUZ1MywtAn2d0Q==/lib/arm64/libnode.so (v8::internal::MessageHandler::ReportMessageNoExceptions(v8::internal::Isolate*, v8::internal::MessageLocation const*, v8::internal::Handlev8::internal::Object, v8::Localv8::Value)+280)

@cashdow
Copy link
Author

cashdow commented Nov 21, 2019

I don't know why the problem occurs with build using gradle through maven { url 'https://jitpack.io' } github

It doesn't work.(above error)
but I downloaded liquidcore source and build.. making .aar
and added dependency with .aar which I was builded.
It's working!!
I don't know if it's problem a gradle or flutter whatever .

@cashdow cashdow closed this as completed Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant