doublesymmetry / react-native-track-player

A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
https://rntp.dev/
Apache License 2.0
3.27k stars 1.01k forks source link

Started getting crash on ios after updating to latest version. #969

Closed jariwalabhavesh closed 3 years ago

jariwalabhavesh commented 4 years ago

Describe the bug Started getting more crashes in ios after updating to latest version v1.2.3.

To Reproduce I am not able to regenerate and not able to figure out why it is happening. I had figure out a crash from firebase.

Environment (please complete the following information): react-native-info

  React Native Environment Info:
    System:
      OS: macOS 10.15.4
      CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
      Memory: 609.34 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.11.3 - ~/.nvm/versions/node/v8.11.3/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 5.6.0 - ~/.nvm/versions/node/v8.11.3/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
      Android SDK:
        API Levels: 21, 22, 23, 24, 25, 26, 27, 28, 29
        Build Tools: 23.0.1, 23.0.2, 23.0.3, 24.0.2, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.0, 28.0.2, 28.0.3, 29.0.2
        System Images: android-22 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-R | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.6 AI-192.7142.36.36.6392135
      Xcode: 11.4/11E146 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.4 => 0.59.4 
    npmGlobalPackages:
      react-native-asset: 1.1.3
      react-native-cli: 2.0.1
      react-native-onesignal: 3.5.0
      react-native-rename: 2.4.1
      react-native-svg: 11.0.1

react-native-track-player version v1.2.3

The issue was occurring on actual devices. Here is the error stack from firebase

Screenshot 2020-06-11 at 5 53 00 PM Screenshot 2020-06-11 at 5 53 12 PM Screenshot 2020-06-11 at 5 53 27 PM Screenshot 2020-06-11 at 5 56 01 PM

Does anyone have an idea why it is happening or how to regenerate it?

curiousdustin commented 4 years ago

I'm not 100% sure this is the same issue, but there has been recent work to address issues with certain URL formats.

https://github.com/react-native-kit/react-native-track-player/commit/5efe26cd5b46c1c91c18ffaa09fe12dc7299e3ea

In certain cases this will fix some crashes that were previously possible.

This has not been included in a release yet.

curiousdustin commented 4 years ago

See https://github.com/react-native-kit/react-native-track-player/pull/950 for more info.

jariwalabhavesh commented 4 years ago

@curiousdustin : Thanks for the update and providing direction. I will do changes in mediaURL file and make fix as mention in 5efe26c. And release new version of my app and see it reduce crashes in next couple of week or not.

I will get back to you with a result.

Thanks,

maxckelly commented 4 years ago

@jariwalabhavesh - Did you end up solving this? I'm facing the same issue. See logs below

Thread 7 name:
Thread 7 Crashed:
0   A Life Lived                    0x000000010315492c MediaURL.init(object:) + 1512 (MediaURL.swift:28)
1   A Life Lived                    0x0000000103154794 MediaURL.init(object:) + 1104 (MediaURL.swift:28)
2   A Life Lived                    0x000000010316d65c Track.init(dictionary:) + 668 (Track.swift:38)
3   A Life Lived                    0x0000000103162038 Track.__allocating_init(dictionary:) + 8 (<compiler-generated>:0)
4   A Life Lived                    0x0000000103162038 RNTrackPlayer.add(trackDicts:before:resolve:reject:) + 688
5   A Life Lived                    0x0000000103162038 0x102f4c000 + 2187320 (RNTrackPlayer.swift:290)
6   A Life Lived                    0x0000000103162be0 @objc RNTrackPlayer.add(trackDicts:before:resolve:reject:) + 220 (<compiler-generated>:0)
7   CoreFoundation                  0x00000001ad5235d4 __invoking___ + 148
8   CoreFoundation                  0x00000001ad3fe9e8 -[NSInvocation invoke] + 448 (NSForwarding.m:3389)
9   CoreFoundation                  0x00000001ad3fefa4 -[NSInvocation invokeWithTarget:] + 80 (NSForwarding.m:3495)
10  A Life Lived                    0x0000000103057670 -[RCTModuleMethod invokeWithBridge:module:arguments:] + 460 (RCTModuleMethod.mm:569)
11  A Life Lived                    0x000000010305975c facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&) + 244 (RCTNativeModule.mm:108)
12  A Life Lived                    0x00000001030594c0 facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const + 44 (RCTNativeModule.mm:73)
13  A Life Lived                    0x00000001030594c0 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 88 (RCTNativeModule.mm:65)
14  libdispatch.dylib               0x00000001ad11afd0 _dispatch_call_block_and_release + 32 (init.c:1454)
15  libdispatch.dylib               0x00000001ad11cac8 _dispatch_client_callout + 20 (object.m:559)
16  libdispatch.dylib               0x00000001ad123c08 _dispatch_lane_serial_drain + 580 (inline_internal.h:2548)
17  libdispatch.dylib               0x00000001ad124734 _dispatch_lane_invoke + 408 (queue.c:3862)
18  libdispatch.dylib               0x00000001ad12e528 _dispatch_workloop_worker_thread + 708 (queue.c:6590)
19  libsystem_pthread.dylib         0x00000001f4a70908 _pthread_wqthread + 276 (pthread.c:2193)
20  libsystem_pthread.dylib         0x00000001f4a7777c start_wqthread + 8