gnolang / gnonative

Develop for Gno using your app's native language
Apache License 2.0
9 stars 9 forks source link

[ios] Runtime thread warning #16

Open D4ryl00 opened 11 months ago

D4ryl00 commented 11 months ago

When the GnoBoard app starts, we have Thread Performance Checker that prints a warning.

2023-09-13 10:31:08.032468+0200 gnoboard[72510:1680197] You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
2023-09-13 10:31:08.032543+0200 gnoboard[72510:1680197] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2023-09-13 10:31:08.237039+0200 gnoboard[72510:1680197] [native] Running application main ({
    initialProps =     {
    };
    rootTag = 1;
})
2023-09-13 10:31:08.526838+0200 gnoboard[72510:1680197] [expo] 🟢 Registering module 'ExponentConstants'
2023-09-13 10:31:08.528483+0200 gnoboard[72510:1680197] [expo] 🟢 Registering module 'ExpoKeepAwake'
2023-09-13 10:31:08.529728+0200 gnoboard[72510:1680197] [expo] 🟢 Registering module 'NativeModulesProxy'
2023-09-13 10:31:08.582764+0200 gnoboard[72510:1680197] [expo] 🟢 Posting 'appBecomesActive' event to registered modules
Thread Performance Checker: Thread running at QOS_CLASS_USER_INTERACTIVE waiting on a lower QoS thread running at QOS_CLASS_DEFAULT. Investigate ways to avoid priority inversions
PID: 72510, TID: 1680197
Backtrace
=================================================================
3   gnoboard                            0x000000010673a5fb -[SRRunLoopThread runLoop] + 43
4   gnoboard                            0x00000001067346e7 +[NSRunLoop(SRWebSocket) SR_networkRunLoop] + 71
5   gnoboard                            0x0000000106738f22 -[SRProxyConnect _openConnection] + 82
6   gnoboard                            0x00000001067382fc -[SRProxyConnect _configureProxy] + 988
7   gnoboard                            0x0000000106737a5b -[SRProxyConnect openNetworkStreamWithCompletion:] + 91
8   gnoboard                            0x000000010673c3db -[SRWebSocket open] + 731
9   gnoboard                            0x0000000106426c0d -[RCTReconnectingWebSocket start] + 173
10  gnoboard                            0x000000010641527b -[RCTPackagerConnection init] + 507
11  gnoboard                            0x0000000106415064 __49+[RCTPackagerConnection sharedPackagerConnection]_block_invoke + 36
12  libdispatch.dylib                   0x000000010998c7ec _dispatch_client_callout + 8
13  libdispatch.dylib                   0x000000010998de85 _dispatch_once_callout + 66
14  gnoboard                            0x000000010641500e +[RCTPackagerConnection sharedPackagerConnection] + 78
15  gnoboard                            0x00000001064b0faa -[RCTDevSettings initialize] + 170
16  gnoboard                            0x00000001063fe160 -[RCTModuleData _initializeModule] + 112
17  gnoboard                            0x00000001063fd9dd -[RCTModuleData setUpInstanceAndBridge:] + 2589
18  gnoboard                            0x00000001063ff960 -[RCTModuleData instance] + 1408
19  gnoboard                            0x00000001063a454c -[RCTCxxBridge moduleForName:lazilyLoadIfNecessary:] + 812
20  gnoboard                            0x000000010640a007 -[RCTModuleRegistry moduleForName:lazilyLoadIfNecessary:] + 135
21  gnoboard                            0x0000000106409f6e -[RCTModuleRegistry moduleForName:] + 46
22  gnoboard                            0x00000001064c33a3 -[RCTPerfMonitor devMenuItem] + 99
23  gnoboard                            0x00000001064c3262 -[RCTPerfMonitor initialize] + 114
24  gnoboard                            0x00000001063fe160 -[RCTModuleData _initializeModule] + 112
25  gnoboard                            0x00000001063fd9dd -[RCTModuleData setUpInstanceAndBridge:] + 2589
26  gnoboard                            0x00000001063ffc27 __25-[RCTModuleData instance]_block_invoke + 39
27  gnoboard                            0x000000010646dad8 RCTUnsafeExecuteOnMainQueueSync + 56
28  gnoboard                            0x00000001063ff7a2 -[RCTModuleData instance] + 962
29  gnoboard                            0x00000001063a9e95 __49-[RCTCxxBridge _prepareModulesWithDispatchGroup:]_block_invoke + 181
30  libdispatch.dylib                   0x000000010998b54f _dispatch_call_block_and_release + 12
31  libdispatch.dylib                   0x000000010998c7ec _dispatch_client_callout + 8
32  libdispatch.dylib                   0x000000010999d7e9 _dispatch_main_queue_drain + 1725
33  libdispatch.dylib                   0x000000010999d11e _dispatch_main_queue_callback_4CF + 31
34  CoreFoundation                      0x00007ff8003b26cc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
35  CoreFoundation                      0x00007ff8003acfbe __CFRunLoopRun + 2429
36  CoreFoundation                      0x00007ff8003ac264 CFRunLoopRunSpecific + 560
37  GraphicsServices                    0x00007ff809b4024e GSEventRunModal + 139
38  UIKitCore                           0x0000000117f9a7bf -[UIApplication _run] + 994
39  UIKitCore                           0x0000000117f9f5de UIApplicationMain + 123
40  gnoboard                            0x0000000106127e30 main + 96
2023-09-13 10:31:08.893866+0200 gnoboard[72510:1680490] [connection] nw_socket_handle_socket_event [C5.1.1:1] Socket SO_ERROR [61: Connection refused]
2023-09-13 10:31:08.896934+0200 gnoboard[72510:1680490] [connection] nw_socket_handle_socket_event [C5.1.2:1] Socket SO_ERROR [61: Connection refused]
2023-09-13 10:31:08.898603+0200 gnoboard[72510:1680527] [connection] nw_connection_get_connected_socket_block_invoke [C5] Client called nw_connection_get_connected_socket on unconnected nw_connection
2023-09-13 10:31:08.898977+0200 gnoboard[72510:1680527] TCP Conn 0x600002c93160 Failed : error 0:61 [61]
2023-09-13 10:31:08.961423+0200 gnoboard[72510:1680514] [expo] 🟢 Creating JS object for module 'NativeModulesProxy'
2023-09-13 10:31:08.968161+0200 gnoboard[72510:1680514] [expo] 🟢 Creating JS object for module 'ExponentConstants'
2023-09-13 10:31:09.135819+0200 gnoboard[72510:1680514] [javascript] Running "main" with {"rootTag":1,"initialProps":{}}

Even if the app seems to work correctly, it's something to investigate.

D4ryl00 commented 11 months ago

https://github.com/facebook/react-native/issues/34400 We need to wait for a fix on their side.

D4ryl00 commented 11 months ago

BTW, Berty Messenger has the same warning.

jefft0 commented 7 months ago

facebook/react-native#34400 We need to wait for a fix on their side.

Hi @D4ryl00 . That react-native issue has been closed. Is there an update on this issue?

D4ryl00 commented 6 months ago

The fix was applied to the main branch, but has not been released yet. So I asked in the discussion to pick it for the next minor release: https://github.com/reactwg/react-native-releases/discussions/104

jefft0 commented 6 months ago

The reply was "it's already in RC0". So, wait for 0.74.0 . https://github.com/facebook/react-native/tags

jefft0 commented 4 months ago

React Native v 0.74.0 is released.