software-mansion / react-native-ide

https://ide.swmansion.com
Other
705 stars 21 forks source link

iOS Build fails because it can't find my Notification Service Extension pods #365

Open marcshilling opened 2 weeks ago

marcshilling commented 2 weeks ago

Description I have a Notification Service Extension as part of my workspace. My Podfile includes these lines:

target 'CleverTapNotificationService' do
  pod 'CTNotificationService'
end

I'm able to build the project myself (via Xcode or react-native run-ios) but attempting to build via React Native IDE gives me these errors:

2024-06-10 11:04:30.501 [info] ld: library 'CTNotificationService' not found
2024-06-10 11:04:30.501 [info] clang: error: linker command failed with exit code 1 (use -v to see invocation)
2024-06-10 11:04:30.519 [info] The following build commands failed:
2024-06-10 11:04:30.519 [info]  Ld /Users/marcshilling/Library/Developer/Xcode/DerivedData/MyProject-cyejqchnhyautoeqhshtkyccxehn/Build/Intermediates.noindex/Untappd.build/BetaRelease-iphonesimulator/CleverTapNotificationService.build/Objects-normal/arm64/Binary/CleverTapNotificationService normal arm64 (in target 'CleverTapNotificationService' from project 'MyProject')

Environment

jakub-gonet commented 2 weeks ago

Was is added recently? If so, can you try doing clean rebuild from the IDE setting menu?

marcshilling commented 2 weeks ago

@jakub-gonet nope, not added recently. Very stable project, just trying out the IDE for the first time. Clean rebuild produces the same error.

terrysahaidak commented 1 week ago

Can you run react-native run-ios and see what scheme and configuration it uses (it logs the full xcodebuild command) and then use the same scheme and configuration in the launch.json?

marcshilling commented 1 week ago

@terrysahaidak Ok yeah seems like I definitely had a mismatch there. Now my issue is that I'm getting ** BUILD SUCCEEDED ** in the logs but still getting the "Cannot run project" error.

jakub-gonet commented 1 week ago

Can you please show the logs from IDE? They're on the same screen ** BUILD SUCCEEDED ** is on, you need to change the tab to "React Native IDE" in the dropdown on the right.

Also, did you manually edit launch.json with mismatched scheme or IDE used default launch.json and detected it wrongly?

marcshilling commented 4 days ago

@jakub-gonet I believe I created launch.json manually. I have an Xcode project with a couple different schemes/configurations so don't think the defaults would have worked for me.

Here's my launch.json:

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "react-native-ide",
      "request": "launch",
      "name": "React Native IDE panel",
      "ios": {
        "configuration": "BetaDebug",
        "scheme": "Beta"
      },
      "android": {
        "buildType": "debug",
        "productFlavor": "beta"
      }
    }
  ]
}

Here's my logs from React Native IDE after I get the BUILD SUCCEEDED message:

2024-06-24 10:32:18.649 [error] Couldn't start device session Command was killed with SIGABRT (Aborted): /Users/marcshilling/.vscode/extensions/swmansion.react-native-ide-0.0.15-darwin-x64/dist/sim-server-executable ios 1594A088-80FE-4447-ABD6-B4362BEE0740 /Users/marcshilling/Library/Caches/com.swmansion.react-native-ide/Devices/iOS
2024-06-24 10:32:24.213 [info] Metro {"buildID":"2","bundleDetails":{"bundleType":"bundle","dev":true,"entryFile":"/Users/marcshilling/Development/untappd-app-v4/index.ios.js","minify":false,"platform":"ios"},"isPrefetch":false,"type":"bundle_build_started"}
2024-06-24 10:32:28.013 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21961) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n(Use `node --trace-warnings ...` to show where the warning was created)\n"}
2024-06-24 10:32:28.013 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21961) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n"}
2024-06-24 10:32:30.637 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21962) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n(Use `node --trace-warnings ...` to show where the warning was created)\n"}
2024-06-24 10:32:30.638 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21962) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n"}
2024-06-24 10:32:35.491 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21966) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n(Use `node --trace-warnings ...` to show where the warning was created)\n(node:21966) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n"}
2024-06-24 10:32:35.508 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21963) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n(Use `node --trace-warnings ...` to show where the warning was created)\n(node:21963) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n"}
2024-06-24 10:32:35.560 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21964) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n(Use `node --trace-warnings ...` to show where the warning was created)\n"}
2024-06-24 10:32:35.562 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21964) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n"}
2024-06-24 10:32:35.747 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21970) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n(Use `node --trace-warnings ...` to show where the warning was created)\n"}
2024-06-24 10:32:35.754 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21970) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n"}
2024-06-24 10:32:35.927 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21968) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n(Use `node --trace-warnings ...` to show where the warning was created)\n(node:21968) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n"}
2024-06-24 10:32:36.243 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21965) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n(Use `node --trace-warnings ...` to show where the warning was created)\n"}
2024-06-24 10:32:36.243 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21965) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n"}
2024-06-24 10:32:36.800 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21967) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n(Use `node --trace-warnings ...` to show where the warning was created)\n(node:21967) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n"}
2024-06-24 10:32:36.800 [info] Metro {"type":"worker_stderr_chunk","chunk":"(node:21969) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n(Use `node --trace-warnings ...` to show where the warning was created)\n(node:21969) Warning: Accessing non-existent property 'then' of module exports inside circular dependency\n"}
2024-06-24 10:33:52.810 [info] Metro {"buildID":"2","type":"bundle_build_done"}
2024-06-24 10:33:54.332 [info] Devtools client connected
2024-06-24 10:33:54.963 [info] Metro {"type":"client_log","level":"log","data":["index.ts","http://localhost:49980/index.bundle//&platform=ios&dev=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.untappdllc.mosaic","1474","13"],"mode":"BRIDGE"}
2024-06-24 10:33:54.963 [info] Metro {"type":"client_log","level":"log","data":["App State changed:","active","http://localhost:49980/index.bundle//&platform=ios&dev=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.untappdllc.mosaic","138793","23"],"mode":"BRIDGE"}
2024-06-24 10:33:54.963 [info] Metro {"type":"client_log","level":"log","data":["AppInit.start()","http://localhost:49980/index.bundle//&platform=ios&dev=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.untappdllc.mosaic","138612","21"],"mode":"BRIDGE"}
2024-06-24 10:33:56.251 [info] Metro {"type":"client_log","level":"log","data":["Running \"app.REGISTRATION_LANDING_SCREEN\" with {\"rootTag\":1,\"initialProps\":{\"componentId\":\"Component1\"}}","http://localhost:49980/index.bundle//&platform=ios&dev=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.untappdllc.mosaic","37071","41"],"mode":"BRIDGE"}
2024-06-24 10:33:57.358 [info] App ready
2024-06-24 10:33:57.811 [info] Metro {"type":"client_log","level":"debug","data":["ComponentDidAppear: app.REGISTRATION_LANDING_SCREEN (Component1) "],"mode":"BRIDGE"}