flipper icon indicating copy to clipboard operation
flipper copied to clipboard

Network plugin does not work on the iOS (react-native 0.72.3)

Open shockwave13 opened this issue 2 years ago • 15 comments

Network plugin does not work on the iOS (working fine on android).

The application connects successfully, I can see the console logs. But only these 4 requests are output to the network and that's it image

react-native version is: "react-native": "0.72.3",

I tried different versions of flipper. For example 0.203.0 and 0.176.1

Configure as described here. Tried both automatic and manual setup but none of the options helped.

Setup doctor say that there are no problems with the configuration. image

Will be appreciated for help!

shockwave13 avatar Jul 25 '23 15:07 shockwave13

I have the same thing, it pops up when I run the command RCT_NEW_ARCH_ENABLED=1 bundle exec pod install. Most likely this is related.

System:
  OS: macOS 13.5
  CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
  Memory: 961.07 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.17.0
    path: ~/.nvm/versions/node/v18.17.0/bin/node
  Yarn:
    version: 1.22.19
    path: ~/.nvm/versions/node/v18.17.0/bin/yarn
  npm:
    version: 9.6.7
    path: ~/.nvm/versions/node/v18.17.0/bin/npm
  Watchman:
    version: 2023.07.24.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.11.3
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK:
    API Levels:
      - "23"
      - "28"
      - "30"
      - "32"
      - "33"
    Build Tools:
      - 29.0.2
      - 30.0.2
      - 30.0.3
      - 32.0.0
      - 32.1.0
      - 33.0.0
    System Images:
      - android-30 | Google APIs Intel x86 Atom
    Android NDK: Not Found
IDEs:
  Android Studio: 2022.1 AI-221.6008.13.2211.9514443
  Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.8
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react: Not Found
  react-native: Not Found
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

Error message:

[!] CocoaPods could not find compatible versions for pod "SocketRocket":
  In Podfile:
    FlipperKit/FlipperKitNetworkPlugin (= 0.209.0) was resolved to 0.209.0, which depends on
      FlipperKit/Core (= 0.209.0) was resolved to 0.209.0, which depends on
        SocketRocket (~> 0.7.0)

    React-Core/RCTWebSocket (from `../node_modules/react-native/`) was resolved to 0.72.3, which depends on
      SocketRocket (= 0.6.1)

shlaikov avatar Aug 03 '23 13:08 shlaikov

+1, facing the same issue after running pod install

[!] CocoaPods could not find compatible versions for pod "SocketRocket":
  In Podfile:
    FlipperKit/SKIOSNetworkPlugin (= 0.211.0) was resolved to 0.211.0, which depends on
      FlipperKit/FlipperKitNetworkPlugin (= 0.211.0) was resolved to 0.211.0, which depends on
        FlipperKit/Core (= 0.211.0) was resolved to 0.211.0, which depends on
          SocketRocket (~> 0.7.0)

    React-Core/RCTWebSocket (from `../../../../node_modules/react-native/`) was resolved to 0.72.3, which depends on
      SocketRocket (= 0.6.1)

alvaroraminelli-cb avatar Aug 15 '23 22:08 alvaroraminelli-cb

We are also facing this same problem. After upgrading to React Native 0.72.4 from 2 major versions and reinstalling Flipper as per the setup guides for a bare/unmanaged app, running pod install I get this:

[!] CocoaPods could not find compatible versions for pod "SocketRocket":
  In Podfile:
    FlipperKit (= 0.210.0) was resolved to 0.210.0, which depends on
      FlipperKit/Core (= 0.210.0) was resolved to 0.210.0, which depends on
        SocketRocket (~> 0.7.0)

    React-CoreModules (from `../node_modules/react-native/React/CoreModules`) was resolved to 0.72.4, which depends on
      SocketRocket (= 0.6.1)

kirgy avatar Aug 18 '23 14:08 kirgy

As far as I can see the last version which uses SocketRocket 0.6.1 is Flipper 0.203.0

So when I use this version the build works without a problem, but the Network plugin still does not work (React Native 0.72.4).

stefan-schweiger avatar Aug 23 '23 07:08 stefan-schweiger

same issue here

amonraRivers avatar Sep 01 '23 21:09 amonraRivers

any updates ? :/

alzalabany avatar Sep 04 '23 21:09 alzalabany

Yeah, same issue here. Would be good to have someone from Flipper comment?

raybelisle avatar Sep 05 '23 13:09 raybelisle

try deleting Flipper-related inits from AppDelegate.m file. That what helped after bumping 1 major to 0.72.x and having similar networking issues as you guys have described

vpetrykov avatar Sep 12 '23 15:09 vpetrykov

try deleting Flipper-related inits from AppDelegate.m file. That what helped after bumping 1 major to 0.72.x and having similar networking issues as you guys have described

this partly fixes the issue when your project uses @react-navigation/native, network tool doesn't show response body. But if you are using react-native-navigation (by wix, v7.35.0) flipper won't be able to connect to ios app at all, not sure if it's fixed in latest releases of react-native-navigation

serhiy-z-israelit-pro avatar Sep 13 '23 08:09 serhiy-z-israelit-pro

I was facing the same issue so in AppDelegate.m file I just commented out the network plugin initialisation and restarted the app, network plugin then started working fine.

Comment this: // [client addPlugin: [[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];

HarshitMadhav avatar Dec 05 '23 06:12 HarshitMadhav

I was facing the same issue so in AppDelegate.m file I just commented out the network plugin initialisation and restarted the app, network plugin then started working fine.

Could you show what you changed? I thought I removed the values but no change. Not sure if I'm not referencing the correct item?

raybelisle avatar Dec 05 '23 15:12 raybelisle

@raybelisle edited my comment

HarshitMadhav avatar Dec 05 '23 18:12 HarshitMadhav

I was facing the same issue so in AppDelegate.m file I just commented out the network plugin initialisation and restarted the app, network plugin then started working fine.

Comment this: // [client addPlugin: [[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];

work for me!

ms314006 avatar Jan 18 '24 08:01 ms314006

I created a new Expo project earlier and tried the following, but I got the same error.

I tried it with the stable react-native versions (0.74.2, 0.73.8, 0.71.19, 0.70.15), but it didn't work. Regarding 0.70.15, it was not possible because the version did not match with React.

npx expo prebuild
cd ios
pod install

sato-ryoka avatar Jun 14 '24 06:06 sato-ryoka

I don't know what the direct cause is, but after reinstalling cocoapods cli, I moved to the ios directory and did a pod update, and the error disappeared. There was no error during prebuild. I hope it helps someone. ^^;

sato-ryoka avatar Jun 14 '24 07:06 sato-ryoka