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

Expo Axios crash in SDK 51 when publish just iOS #2443

Open
pedro0506 opened this issue Jun 20, 2024 · 0 comments
Open

Expo Axios crash in SDK 51 when publish just iOS #2443

pedro0506 opened this issue Jun 20, 2024 · 0 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@pedro0506
Copy link

Build/Submit details page URL

No response

Summary

Expo Axios crashes on SDK 51 when publishing iOS only when used post.

Friends, I've been struggling for days to find out why my app isn't published by Apple.

Everything works fine when tested locally by npx expo start.

However, it fails when testing using TestFlight.

I discovered after a lot of debugging that the error occurs from iOS version 17 onwards.

Please help me with a solution for Axios.

Lock location:

const returnApi = await api.post('/login', { email: form.login, password: form.password, type: 'pelvicFloor' });

Managed or bare?

iOS

Environment

Running "expo doctor"
Running 12 checks on your project...
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check for issues with metro config
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that packages match versions required by installed Expo SDK
✔ Check that native modules do not use incompatible support packages
✔ Check for legacy global CLI installed locally
✔ Check that native modules use compatible support package versions for installed Expo SDK
Didn't find any issues with the project!

Error output

Incident Identifier: DD2976B4-2A2B-4860-A092-6E4DF03FDAFA
Distributor ID: com.apple.TestFlight
Hardware Model: iPhone14,2
Process: PelvicFloor [1980]
Path: /private/var/containers/Bundle/Application/DB546BB5-A021-4C1E-9B37-5247EF276FBB/PelvicFloor.app/PelvicFloor
Identifier: com.crwa.pelvic
Version: 1.38.0 (1.38.0)
AppStoreTools: 15F31e
AppVariant: 1:iPhone14,2:17.4
Beta: YES
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.crwa.pelvic [992]

Date/Time: 2024-06-18 16:19:17.2082 -0300
Launch Time: 2024-06-18 16:19:04.4440 -0300
OS Version: iPhone OS 17.5.1 (21F90)
Release Type: User
Baseband Version: 3.50.04
Report Version: 104

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: PelvicFloor [1980]

Triggered by Thread: 5

Last Exception Backtrace:
0 CoreFoundation 0x1882c8f20 __exceptionPreprocess + 164 (NSException.m:249)
1 libobjc.A.dylib 0x180172018 objc_exception_throw + 60 (objc-exception.mm:356)
2 PelvicFloor 0x104282828 RCTFatal + 568 (RCTAssert.m:147)
3 PelvicFloor 0x10429cbfc -[RCTCxxBridge handleError:] + 432 (RCTCxxBridge.mm:1091)
4 PelvicFloor 0x10429b548 __56-[RCTCxxBridge _initializeBridge:parentInspectorTarget:]_block_invoke + 56 (RCTCxxBridge.mm:671)
5 PelvicFloor 0x1042b030c facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) + 56 (RCTMessageThread.mm:70)
6 PelvicFloor 0x1042b00f8 std::__1::__function::__value_func<void ()>::operator()abi:ue170006 const + 20 (function.h:518)
7 PelvicFloor 0x1042b00f8 std::__1::function<void ()>::operator()() const + 20 (function.h:1169)
8 PelvicFloor 0x1042b00f8 invocation function for block in facebook::react::RCTMessageThread::runAsync(std::__1::function<void ()>) + 44 (RCTMessageThread.mm:44)
9 CoreFoundation 0x1882aac9c CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 28 (CFRunLoop.c:1805)
10 CoreFoundation 0x188298dec __CFRunLoopDoBlocks + 356 (CFRunLoop.c:1847)
11 CoreFoundation 0x188298ad0 __CFRunLoopRun + 2440 (CFRunLoop.c:3203)
12 CoreFoundation 0x188297cd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
13 PelvicFloor 0x104299260 +[RCTCxxBridge runRunLoop] + 212 (RCTCxxBridge.mm:326)
14 Foundation 0x1871cf718 NSThread__start + 732 (NSThread.m:991)
15 libsystem_pthread.dylib 0x1e512106c _pthread_start + 136 (pthread.c:931)
16 libsystem_pthread.dylib 0x1e511c0d8 thread_start + 8 (:-1)

Thread 0 name:
Thread 0:
0 libsystem_kernel.dylib 0x00000001d1378808 mach_msg2_trap + 8 (:-1)
1 libsystem_kernel.dylib 0x00000001d137c008 mach_msg2_internal + 80 (mach_msg.c:201)
2 libsystem_kernel.dylib 0x00000001d137bf20 mach_msg_overwrite + 436 (mach_msg.c:0)
3 libsystem_kernel.dylib 0x00000001d137bd60 mach_msg + 24 (mach_msg.c:323)
4 CoreFoundation 0x0000000188298f5c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5 CoreFoundation 0x0000000188298600 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6 CoreFoundation 0x0000000188297cd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7 GraphicsServices 0x00000001cd1481a8 GSEventRunModal + 164 (GSEvent.c:2196)
8 UIKitCore 0x000000018a8d090c -[UIApplication _run] + 888 (UIApplication.m:3713)
9 UIKitCore 0x000000018a9849d0 UIApplicationMain + 340 (UIApplication.m:5303)
10 PelvicFloor 0x000000010405440c main + 80 (main.m:7)
11 dyld 0x00000001ab949e4c start + 2240 (dyldMain.cpp:1298)

Thread 1:
0 libsystem_pthread.dylib 0x00000001e511c0c4 start_wqthread + 0 (:-1)

Thread 2:
0 libsystem_pthread.dylib 0x00000001e511c0c4 start_wqthread + 0 (:-1)

Thread 3:
0 libsystem_pthread.dylib 0x00000001e511c0c4 start_wqthread + 0 (:-1)

Thread 4 name:
Thread 4:
0 libsystem_kernel.dylib 0x00000001d1378808 mach_msg2_trap + 8 (:-1)
1 libsystem_kernel.dylib 0x00000001d137c008 mach_msg2_internal + 80 (mach_msg.c:201)
2 libsystem_kernel.dylib 0x00000001d137bf20 mach_msg_overwrite + 436 (mach_msg.c:0)
3 libsystem_kernel.dylib 0x00000001d137bd60 mach_msg + 24 (mach_msg.c:323)
4 CoreFoundation 0x0000000188298f5c __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2624)
5 CoreFoundation 0x0000000188298600 __CFRunLoopRun + 1208 (CFRunLoop.c:3007)
6 CoreFoundation 0x0000000188297cd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7 Foundation 0x00000001871b8e4c -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 (NSRunLoop.m:373)
8 Foundation 0x00000001871b8c9c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64 (NSRunLoop.m:420)
9 UIKitCore 0x000000018a8e4640 -[UIEventFetcher threadMain] + 420 (UIEventFetcher.m:1207)
10 Foundation 0x00000001871cf718 NSThread__start + 732 (NSThread.m:991)
11 libsystem_pthread.dylib 0x00000001e512106c _pthread_start + 136 (pthread.c:931)
12 libsystem_pthread.dylib 0x00000001e511c0d8 thread_start + 8 (:-1)

Thread 5 name:
Thread 5 Crashed:
0 libsystem_kernel.dylib 0x00000001d138342c __pthread_kill + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001e5122c0c pthread_kill + 268 (pthread.c:1721)
2 libsystem_c.dylib 0x0000000190226ba0 abort + 180 (abort.c:118)
3 libc++abi.dylib 0x00000001e5040ca4 abort_message + 132 (abort_message.cpp:78)
4 libc++abi.dylib 0x00000001e5030e5c demangling_terminate_handler() + 348 (cxa_default_handlers.cpp:77)
5 libobjc.A.dylib 0x000000018018de2c _objc_terminate() + 144 (objc-exception.mm:496)
6 libc++abi.dylib 0x00000001e5040068 std::__terminate(void (*)()) + 16 (cxa_handlers.cpp:59)
7 libc++abi.dylib 0x00000001e504360c __cxa_rethrow + 204 (cxa_exception.cpp:637)
8 libobjc.A.dylib 0x0000000180189ea4 objc_exception_rethrow + 44 (objc-exception.mm:399)
9 CoreFoundation 0x0000000188297d88 CFRunLoopRunSpecific + 784 (CFRunLoop.c:3436)
10 PelvicFloor 0x0000000104299260 +[RCTCxxBridge runRunLoop] + 212 (RCTCxxBridge.mm:326)
11 Foundation 0x00000001871cf718 NSThread__start + 732 (NSThread.m:991)
12 libsystem_pthread.dylib 0x00000001e512106c _pthread_start + 136 (pthread.c:931)
13 libsystem_pthread.dylib 0x00000001e511c0d8 thread_start + 8 (:-1)

Thread 6 name:
Thread 6:
0 libsystem_kernel.dylib 0x00000001d137e1cc __psynch_cvwait + 8 (:-1)
1 libsystem_pthread.dylib 0x00000001e511e6e4 _pthread_cond_wait + 1228 (pthread_cond.c:862)
2 libc++.1.dylib 0x000000019867e504 std::__1::condition_variable::wait(std::__1::unique_lockstd::__1::mutex&) + 28 (condition_variable.cpp:45)
3 hermes 0x0000000105894020 hermes::vm::HadesGC::Executor::worker() + 116
4 hermes 0x0000000105893f88 void* std::__1::__thread_proxy[abi:v160006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_deletestd::__1::__thread_struct>, hermes::vm::HadesGC::Executor::Exec... + 44
5 libsystem_pthread.dylib 0x00000001e512106c _pthread_start + 136 (pthread.c:931)
6 libsystem_pthread.dylib 0x00000001e511c0d8 thread_start + 8 (:-1)

Thread 7:
0 libsystem_pthread.dylib 0x00000001e511c0c4 start_wqthread + 0 (:-1)

Thread 5 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000
x4: 0x00000001e50452c3 x5: 0x000000016c20ab80 x6: 0x000000000000006e x7: 0x0000000000000000
x8: 0x9c652b91615e49b8 x9: 0x9c652b900d7ef9b8 x10: 0x0000000000000200 x11: 0x000000016c20a6b0
x12: 0x0000000000000000 x13: 0x00000000001ff800 x14: 0x0000000000000010 x15: 0x0000000000000000
x16: 0x0000000000000148 x17: 0x000000016c20b000 x18: 0x0000000000000000 x19: 0x0000000000000006
x20: 0x0000000000004f07 x21: 0x000000016c20b0e0 x22: 0x00000001efbbbc70 x23: 0x0000000000000001
x24: 0x0000000301ebc900 x25: 0x0000000000000001 x26: 0x00000003027b0f30 x27: 0x0000000000000000
x28: 0x0000000000000001 fp: 0x000000016c20aaf0 lr: 0x00000001e5122c0c
sp: 0x000000016c20aad0 pc: 0x00000001d138342c cpsr: 0x40001000
esr: 0x56000080 Address size fault

Binary Images:
0x104050000 - 0x104893fff PelvicFloor arm64 <5de4658cf5f83a1f93057c7eab85da77> /private/var/containers/Bundle/Application/DB546BB5-A021-4C1E-9B37-5247EF276FBB/PelvicFloor.app/PelvicFloor
0x104b9c000 - 0x104ba7fff libobjc-trampolines.dylib arm64e <2e2c05f8377a30899ad91926d284dd03> /private/preboot/Cryptexes/OS/usr/lib/libobjc-trampolines.dylib
0x1057c8000 - 0x10599bfff hermes arm64 <97826e1cca1834aea6b0e7fdf0646359> /private/var/containers/Bundle/Application/DB546BB5-A021-4C1E-9B37-5247EF276FBB/PelvicFloor.app/Frameworks/hermes.framework/hermes
0x18015c000 - 0x1801a9f43 libobjc.A.dylib arm64e <53115e1fe35330d99e8a4e6e73489f05> /usr/lib/libobjc.A.dylib
0x1870f1000 - 0x187c66fff Foundation arm64e <3d3a12e3f5e9361fb00a4a5e8861aa55> /System/Library/Frameworks/Foundation.framework/Foundation
0x188245000 - 0x188772fff CoreFoundation arm64e <00e76a98210c3cb5930bf236807ff24c> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
0x18a4c6000 - 0x18bfe6fff UIKitCore arm64e <1741fa374e53371e8daed611aab0043d> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
0x1901b1000 - 0x19022eff3 libsystem_c.dylib arm64e /usr/lib/system/libsystem_c.dylib
0x198671000 - 0x1986fafff libc++.1.dylib arm64e /usr/lib/libc++.1.dylib
0x1ab90d000 - 0x1ab999ef7 dyld arm64e <71846eacee653697bf7d790b6a07dcdb> /usr/lib/dyld
0x1cd147000 - 0x1cd14ffff GraphicsServices arm64e /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
0x1d1377000 - 0x1d13b0fef libsystem_kernel.dylib arm64e <13b5134e819c3baab3004856112114cb> /usr/lib/system/libsystem_kernel.dylib
0x1e502c000 - 0x1e5047ffb libc++abi.dylib arm64e /usr/lib/libc++abi.dylib
0x1e511b000 - 0x1e5127ff3 libsystem_pthread.dylib arm64e <1196b6c3333d3450818ff3663484b8eb> /usr/lib/system/libsystem_pthread.dylib

EOF

Reproducible demo or steps to reproduce from a blank project

async function handleLogin(form: FormData) {
setHideIntroduction(hideIntroduction + 1)

try {
  const returnApi = await api.post('/login', {
    email: form.login,
    password: form.senha,
    tipo: 'pelvicFloor'
  });

  const userLogged = {
    id: returnApi.data.user.id,
    name: returnApi.data.user.nome,
    email: returnApi.data.user.email,
    sexo: returnApi.data.user.sexo,
    tk: returnApi.data.tk,
    senha: form.senha,
    type: false
  }
  console.log('userLogged', userLogged)

  api.defaults.headers.Authorization = `Bearer ${returnApi.data.tk}`
  
  setUser(userLogged)

  await AsyncStorage.setItem(`@ipelvis:user`, JSON.stringify(userLogged));
  
  const daySetted = await AsyncStorage.getItem(`@ipelvis:dayLog`);

  if(!daySetted){
    await AsyncStorage.setItem(`@ipelvis:dayLog`, JSON.stringify(Date.now() + 86400000))
  }
  
} catch (error) {
  Alert.alert(
    linguagem == "pt-BR" ?
    "Não foi possível logar"
    : "Unable to login",
    linguagem == "pt-BR" ?
    "Usuário ou senha incorretos, tente novamente."
    : "Incorrect username or password, try again.",
  )

  //Alert.alert(error)
}

}

@pedro0506 pedro0506 added the needs review Issue is ready to be reviewed by a maintainer label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant