urbanairship / react-native-airship

Airship React Native module
Other
86 stars 60 forks source link

code: 'AIRSHIP_ERROR', message: 'Invalid feature chat' on iOS #574

Closed maya-salcedo closed 1 month ago

maya-salcedo commented 1 month ago

❗For how-to inquiries involving Airship functionality or use cases, please contact (support)[https://support.airship.com/].

Preliminary Info

What Airship dependencies are you using?

"@ua/react-native-airship": "^18.0.3",

What are the versions of any relevant development tools you are using?

 "react": "18.2.0",
 "react-native": "0.73.4", --> fabric architecture enabled
 "node": ">=20"

Report

What unexpected behavior are you seeing?

Calling privacy manager right after initializing Airship throws an error.

await Airship.takeOff({
                enabledFeatures: [],
                default: {
                  appSecret: 'myapp_appSecret',
                  appKey: 'myapp_appKey',
                },
                site: 'eu',
                urlAllowList: ['*'],
              });
await Airship.privacyManager.disableFeatures(FEATURES_ALL);  -->This throws error

The error:

{ code: 'AIRSHIP_ERROR',
  message: 'Invalid feature chat',
  nativeStackIOS: 
   [ '0   MyApp                           0x0000000105297984 RCTJSErrorFromCodeMessageAndNSError + 112',
     '1   MyApp                           0x0000000105597164 ___ZZN8facebook5react15ObjCTurboModule13createPromiseERNS_3jsi7RuntimeENSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEU13block_pointerFvU13block_pointerFvP11objc_objectEU13block_pointerFvP8NSStringSH_P7NSErrorEEENK3$_0clES4_RKNS2_5ValueEPSQ_m_block_invoke.59 + 388',
     '2   MyApp                           0x0000000105b520c0 -[RTNAirship handleResult:error:resolve:reject:] + 192',
     '3   MyApp                           0x0000000105b50e78 -[RTNAirship privacyManagerDisableFeature:resolve:reject:] + 200',
     '4   CoreFoundation                      0x000000019d655814 00E76A98-210C-3CB5-930B-F236807FF24C + 133140',
     '5   CoreFoundation                      0x000000019d654860 00E76A98-210C-3CB5-930B-F236807FF24C + 129120',
     '6   CoreFoundation                      0x000000019d6cb1dc 00E76A98-210C-3CB5-930B-F236807FF24C + 614876',
     '7   MyApp                           0x000000010558d414 ___ZN8facebook5react15ObjCTurboModule23performMethodInvocationERNS_3jsi7RuntimeEbPKcP12NSInvocationP14NSMutableArray_block_invoke + 240',
     '8   MyApp                       0x000000010559e6b4 _ZZN8facebook5react15ObjCTurboModule23performMethodInvocationERNS_3jsi7RuntimeEbPKcP12NSInvocationP14NSMutableArrayENK3$_2clEv + 32',
     '9  MyApp                        0x000000010559e688 _ZNSt3__18__invokeB8ue170006IRZN8facebook5react15ObjCTurboModule23performMethodInvocationERNS1_3jsi7RuntimeEbPKcP12NSInvocationP14NSMutableArrayE3$_2JEEEDTclclsr3stdE7declvalIT_EEspclsr3stdE7declvalIT0_EEEEOSF_DpOSG_ + 24',
     '10  MyApp                          0x000000010559e640 _ZNSt3__128__invoke_void_return_wrapperIvLb1EE6__callB8ue170006IJRZN8facebook5react15ObjCTurboModule23performMethodInvocationERNS3_3jsi7RuntimeEbPKcP12NSInvocationP14NSMutableArrayE3$_2EEEvDpOT_ + 24',
     '11  MyApp                           0x000000010559e61c _ZNSt3__110__function12__alloc_funcIZN8facebook5react15ObjCTurboModule23performMethodInvocationERNS2_3jsi7RuntimeEbPKcP12NSInvocationP14NSMutableArrayE3$_2NS_9allocatorISE_EEFvvEEclB8ue170006Ev + 28',
     '12  MyApp                        0x000000010559d284 _ZNSt3__110__function6__funcIZN8facebook5react15ObjCTurboModule23performMethodInvocationERNS2_3jsi7RuntimeEbPKcP12NSInvocationP14NSMutableArrayE3$_2NS_9allocatorISE_EEFvvEEclEv + 28',
     '13  MyApp                 0x00000001051ecf38 _ZNKSt3__110__function12__value_funcIFvvEEclB8ue170006Ev + 68',
     '14  MyApp                 0x00000001051ecee8 _ZNKSt3__18functionIFvvEEclEv + 24',
     '15  MyApp                 0x00000001055a6c24 ___ZN12_GLOBAL__N_129ModuleNativeMethodCallInvoker11invokeAsyncERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEONS1_8functionIFvvEEE_block_invoke + 44',
     '16  libdispatch.dylib                   0x000000010a308b98 _dispatch_call_block_and_release + 32',
     '17  libdispatch.dylib                   0x000000010a30a7bc _dispatch_client_callout + 20',
     '18  libdispatch.dylib                   0x000000010a31ad58 _dispatch_main_queue_drain + 1084',
     '19  libdispatch.dylib                   0x000000010a31a90c _dispatch_main_queue_callback_4CF + 44',
     '20  CoreFoundation                      0x000000019d68b710 00E76A98-210C-3CB5-930B-F236807FF24C + 354064',
     '21  CoreFoundation                      0x000000019d688914 00E76A98-210C-3CB5-930B-F236807FF24C + 342292',
     '22  CoreFoundation                      0x000000019d687cd8 CFRunLoopRunSpecific + 608',
     '23  GraphicsServices                    0x00000001e25381a8 GSEventRunModal + 164',
     '24  UIKitCore                           0x000000019fcc090c 1741FA37-4E53-371E-8DAE-D611AAB0043D + 4237580',
     '25  UIKitCore                           0x000000019fd749d0 UIApplicationMain + 340',
     '26  MyApp                           0x000000010429081c main + 96',
     '27  dyld                                0x00000001c0d39e4c 71846EAC-EE65-3697-BF7D-790B6A07DCDB + 249420' ],
  domain: 'com.urbanairship.error',
  userInfo: { NSLocalizedDescription: 'Invalid feature chat' } 

What is the expected behavior?

Should disable data collection

What are the steps to reproduce the unexpected behavior?

This happens on iOS. I haven't tested yet on Android

rlepinski commented 1 month ago

Thanks for the report, we will get a patch release out. You can workaround this by setting the enabled features to an empty set instead of disabling all features

Ulrico972 commented 1 month ago

Hello, the fix has been released in the version 19.1.0.