Flipper:桌面未能提供证书。 Flipper桌面的错误

发布于 2025-02-09 03:57:26 字数 247 浏览 3 评论 0原文

当我尝试从Xcode运行iOS应用时,获取脚钳错误日志。

flipper: Desktop failed to provide certificates. Error from flipper desktop:
rsocket::StreamInterruptedException: connection error

应用程序正常工作,找不到问题。但是该日志每1秒钟一次。

有什么方法可以解决此问题?

Getting a flipper error log while i am trying to run ios app from xcode.

flipper: Desktop failed to provide certificates. Error from flipper desktop:
rsocket::StreamInterruptedException: connection error

App is working smoothly, no issues found. But this log is coming in every 1 second.

Is there any way to fix this issue?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

℉服软 2025-02-16 03:57:27

开放fllipper>设置>启用物理iOS设备

Open Flipper > Settings > Enable physical iOS devices

情丝乱 2025-02-16 03:57:27

TL:DR;

idb_companion是为新的Swift Enviroments构建的,但我仍在使用Big Sur。升级MACOS后,Flipper设法连接到我的iOS设备罚款。

当然,我在下面解释说,我从源构建IDB,以匹配版本1.1.8 gode> idb_companion 和idb代码>。

下面我还解释了如何发现崩溃的错误IDB_COMPANION防止Flipper保持稳定的连接并重新启动多次产生消息:[conn] ...在20秒内重新启动4次


我学到的内容:

  • iDB_Companion 在我的Mac上以了解如何从iOS物理设备控制或获取日志的服务器;
  • idb 是命令行接口,flipper可以用于与 idb_companion 进行通信。

我能够安装使用自制。但是我无法为CLI(又称IDB(又称FB-IDB))安装相同的版本1.1.8

因此,我决定从GitHub存储库中构建IDB。构建的命令行

pip3.9 install .

首先是我在与grpclib版本有关的错误中挣扎的。显然,IDB需要版本0.4.1,但我安装了0.4.3。要降级grpclib我使用了以下命令:

pip3.9 install grpclib==0.4.1

我还试图确保在其他Python版本中安装了其他grpclib,所以我跑了一堆

pip3 install grpclib==0.4.1
pip3.7 install grpclib==0.4.1
pip3.9 install grpclib==0.4.1

以查看哪个版本我有python,无论如何我都跑了很多

which pip
which pip3
which pip3.6
which pip3.7
which pip3.8
which pip3.9
which pip3.10

...
由于我是在随机构建IDB使用那些不同的Python版本的情况下,有或没有sudo,我还遇到了以下错误,仅通过添加sudo就修复了以下错误再次到构建命令。

ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/Users/alexandrelage/Library/Python/3.9/lib'
Check the permissions.

无论如何...

基本上修复了grpclib要求,pip3.9 install。版本1.1.8)。

当然,我不得不去Flipper>>设置并更新IDB路径。一切似乎都很好。

不幸的是,这还不够,Flipper继续尝试连接到我的iPhone设备而没有成功。然后,我复制了iDB命令flipper试图运行:

/Library/Frameworks/Python.framework/Versions/3.7/bin/idb file pull --log DEBUG --udid 00008020-000A7D2C36DUMMYDUMMY --bundle-id org.reactjs.native.example.MyExample 'Library/Application Support/sonar/app.csr' '/var/folders/r6/xrp3nw8j4wj45mvdpnlzlv740000gn/T/tmp-10199-CW6olKXUvwek/app.csr'

我很幸运能在另一个选项卡上运行idb_companion时运行上面的命令。我用来手动启动idb_companion的命令是:

idb_companion --uidid 00008020-000A7D2C36DUMMYDUMMY

我很幸运,因为我注意到idb_companion当我尝试运行IDB(客户)命令上方我从flipper复制了。我再次重新启动idb_companion,并尝试再次运行idb(client)命令。然后,我意识到IDB_COMPANION正在带有错误消息崩溃:

...
2022-10-21 18:14:11.853-0300 Starting swift server on tcp port 10882
2022-10-21 18:14:11.854-0300 Swift server started on [IPv6]::/:::10882
{"grpc_swift_port":10882,"grpc_port":10882}
2022-10-21 18:14:11.854-0300 Companion will stay alive if target goes offline
2022-10-21 18:14:30.997-0300 Start of connect
dyld: lazy symbol binding failed: 
can't resolve symbol _$sScCMa in 
/usr/local/Cellar/idb-companion/1.1.8/bin/../Frameworks/IDBGRPCSwift.framework/Versions/A/IDBGRPCSwift 
because dependent dylib @rpath/libswift_Concurrency.dylib could not be loaded
dyld: can't resolve symbol _$sScCMa in 
/usr/local/Cellar/idb-companion/1.1.8/bin/../Frameworks/IDBGRPCSwift.framework/Versions/A/IDBGRPCSwift 
because dependent dylib @rpath/libswift_Concurrency.dylib could not be loaded

这表明还有其他事情正在发生。似乎idb_companion是为与我的迅速环境建立的。我在Google上寻找此错误,并意识到我的Xcode已经过时了。实际上,我仍在使用Big Sur

现在,我将Macos升级到蒙特利,Flipper设法将我的iOS设备连接起来。而且我什至还没有升级Xcode。

TL: DR;

idb_companion was built for newer Swift enviroments, but I was still using Big Sur. After upgrading my MacOS, Flipper managed to connect to my iOS device fine.

Of course I explain below that I build idb from the source to match the version 1.1.8 for both idb_companion and idb.

Below I also explain how I found the error that was crashing idb_companion preventing Flipper from maintaining a stable connection and restarting several times yielding the message: [conn] ... restarted 4 times in 20 seconds.


What I learned:

  • idb_companion runs on my Mac in the background as a server that knows how to control or get logs from iOS physical devices;
  • idb is a command line interface that Flipper can use for communicating with idb_companion.

I was able to install [email protected] using Homebrew. But I was not able to install the same version 1.1.8 for the cli (aka idb (aka fb-idb)).

So I decided to build the idb from the github repo. The command line for building it was

pip3.9 install .

First I struggled with an error related to grpclib version. Apparently idb required the version 0.4.1 but I had 0.4.3 installed. To downgrade grpclib I used the following command:

pip3.9 install grpclib==0.4.1

I also tried to make sure there was no other grpclib installed in other python version, so I ran a bunch of

pip3 install grpclib==0.4.1
pip3.7 install grpclib==0.4.1
pip3.9 install grpclib==0.4.1

To see which version of python I had, I ran a bunch of

which pip
which pip3
which pip3.6
which pip3.7
which pip3.8
which pip3.9
which pip3.10

Anyways...
As I was randomly trying to build idb with those different python versions, with and without sudo, I also faced the following error, which was fixed just by adding sudo again to the build command.

ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/Users/alexandrelage/Library/Python/3.9/lib'
Check the permissions.

Anyways...

Basically after fixing the grpclib requirement, pip3.9 install . inside the source folder was enough for building idb (client, on version 1.1.8).

Of course I had to go to Flipper >> Settings and update the idb path. All seemed good.

Unfortunately that was not enough, Flipper kept on trying to connect to my iPhone device with no success. Then I copied the idb command Flipper was trying to run:

/Library/Frameworks/Python.framework/Versions/3.7/bin/idb file pull --log DEBUG --udid 00008020-000A7D2C36DUMMYDUMMY --bundle-id org.reactjs.native.example.MyExample 'Library/Application Support/sonar/app.csr' '/var/folders/r6/xrp3nw8j4wj45mvdpnlzlv740000gn/T/tmp-10199-CW6olKXUvwek/app.csr'

I was lucky to run the command above while I was also running idb_companion on another tab. The command I used to manually start idb_companion was:

idb_companion --uidid 00008020-000A7D2C36DUMMYDUMMY

I was lucky because I noticed the idb_companion tab stopped running when I tried to run the idb (client) command above I copied from Flipper. I restarted idb_companion again and tried to run the idb (client) command again. Then I realized idb_companion was crashing with an error message:

...
2022-10-21 18:14:11.853-0300 Starting swift server on tcp port 10882
2022-10-21 18:14:11.854-0300 Swift server started on [IPv6]::/:::10882
{"grpc_swift_port":10882,"grpc_port":10882}
2022-10-21 18:14:11.854-0300 Companion will stay alive if target goes offline
2022-10-21 18:14:30.997-0300 Start of connect
dyld: lazy symbol binding failed: 
can't resolve symbol _$sScCMa in 
/usr/local/Cellar/idb-companion/1.1.8/bin/../Frameworks/IDBGRPCSwift.framework/Versions/A/IDBGRPCSwift 
because dependent dylib @rpath/libswift_Concurrency.dylib could not be loaded
dyld: can't resolve symbol _$sScCMa in 
/usr/local/Cellar/idb-companion/1.1.8/bin/../Frameworks/IDBGRPCSwift.framework/Versions/A/IDBGRPCSwift 
because dependent dylib @rpath/libswift_Concurrency.dylib could not be loaded

That indicated there was something else going on. It seemed idb_companion was built for a Swift environment different to mine. I looked for this error on Google and realized my XCode was outdated. In fact I was still using Big Sur.

Now I upgraded my MacOS to Montrey, Flipper manages to connect to my iOS device fine. And I haven't even upgraded my XCode yet.

故事和酒 2025-02-16 03:57:27

与Podfile(React Native 0.72.4)一起,您需要使用React-nativativatient,则需要将React-Native-nive-nive-nive-nive-nive-nive-nive-nive-nive-nive-flipper设置为。 config.js 文件:

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# 

因此,我更新了react> react-native.config.js这样:

// react-native.config.js at project root
module.exports = {
  project: {
    ios: {},
    android: {},
  },
  assets: ['./src/resources/fonts/'],
  dependencies: {
    // when NO_FLIPPER=1
    ...(process.env.NO_FLIPPER
      ? {'react-native-flipper': {platforms: {ios: null}}}
      : {}),
  },
};

现在最终使用iPad

According with Podfile (React Native 0.72.4), you need to exclude react-native-flipper if NO_FLIPPER=1 is set, using a react-native.config.js file:

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
#   dependencies: {
#     ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# 

so I updated my react-native.config.js like this:

// react-native.config.js at project root
module.exports = {
  project: {
    ios: {},
    android: {},
  },
  assets: ['./src/resources/fonts/'],
  dependencies: {
    // when NO_FLIPPER=1
    ...(process.env.NO_FLIPPER
      ? {'react-native-flipper': {platforms: {ios: null}}}
      : {}),
  },
};

Now finally it works as expected with iPad

Screenshot 2023-11-22 at 19 27 16

倾城花音 2025-02-16 03:57:26

我遇到了同样的问题,终于找到了一种解决这个问题的方法。
我认为,当您尝试使用真实iOS设备调试应用程序时,您会遇到此错误。
这些是我采取的步骤。

  1. 您需要在背景上运行Flipper桌面。它具有集成的React-Devtools插件。从fbflipper.com下载。遵循其文档中的说明,这很简单,很简单。
  2. 此时,您将没有相同的错误消息。 (它会说证书还可以。)但是,如果您遇到IDB二进制位置的任何问题(我在M1机器上进行了),则此新消息将每秒弹出,而Flipper界面将告诉您设备不是成立。只需确保找到合适的IDB二进制位置并配置它,重新启动Flipper,然后将其解决。我的位于“/opt/homebrew/bin/idb”中。

I had the same issue and I finally found a way to resolve this.
I assume you're getting this error when you try to debug your app with a real iOS device.
These are the steps I took.

  1. You need to run Flipper Desktop on your background. It has an integrated React-devtools plugin. Download it from fbflipper.com. Follow the instructions on their docs it's simple and quite straightforward.
  2. At this point you won't have the same error message. (It will say that the certificate is ok.) However, if you encounter any issues with idb binary location (which I did on my M1 machine), this new message will pop every second and Flipper interface will tell you that the device is not found. Just make sure to find the right idb binary location and configure it, restart Flipper, and this will be resolved one and for all. Mine was in "/opt/homebrew/bin/idb".
你不是我要的菜∠ 2025-02-16 03:57:26

只是将所有内容分组在一起,因为我在这个问题上很难...

  1. 开放flaipper 。在左下角,单击齿轮图标,然后在设置上。
  2. 确保启用“启用物理iOS设备” 选项。
  3. “ IDB二进制位置” 上,您可能会看到一个警报符号(⚠️)。如果是这种情况,则意味着您没有IDB客户端,也没有正确的位置。
  4. 请关注所有这些步骤以安装IDB伴侣和IDB客户端。
  5. 如果您没有python安装:brew install python3。然后尝试重复步骤4。
  6. 如果一切顺利,则您的 idb IDB-Companion 应位于“/opt/homebrew/bin”。因此,现在您可以回到Flipper>齿轮图标>设置,粘贴路径“/opt/homebrew/bin/idb”,右侧的警报符号(⚠️)将消失。
  7. 如果您仍然有警报符号,则意味着您的IDB文件不在正确的位置。

Just grouping everything together, because I had a hard time with this issue...

  1. Open Flipper. In the lower-left corner, click on the gear icon and then on Settings.
  2. Be sure to enable the "Enable physical iOS devices" option.
  3. On "IDB binary location", you'll probably see an alert sign (⚠️). If that is the case, it means you do not have an idb client or it is not right located.
  4. Follow ALL these steps to install the idb companion and idb client.
  5. If you do not have python install: brew install python3. Then try to repeat step 4.
  6. If everything went right, your idb and idb-companion should be located at "/opt/homebrew/bin". So now you can go back to Flipper > Gear Icon > Settings, paste the path "/opt/homebrew/bin/idb" and the alert sign (⚠️) on the right will disappear.
  7. If you still have the alert sign it means your idb file is not in the right location. There are several alternatives in this git post that solve this issue, so check them out.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文