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

升级 5.0.0-rc.6 后,项目无法运行 #672

Open
musicode opened this issue Jun 6, 2021 · 8 comments
Open

升级 5.0.0-rc.6 后,项目无法运行 #672

musicode opened this issue Jun 6, 2021 · 8 comments

Comments

@musicode
Copy link

musicode commented Jun 6, 2021

我从 4.3.1 版本升级到 5.0.0-rc.6 版本,运行环境为 react-native,碰到几个问题,想咨询一下:

  1. 调用 realtime.createIMClient 方法后,报错如下:
Request has been terminated
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.

老版本正常使用,升级报这个错真是一脸懵逼,不知道怎么改

  1. 5.x 版本应该支持引入 ES6 版本的 SDK,但是我不知道该如何引入
@sdjdd
Copy link
Contributor

sdjdd commented Jun 7, 2021

你好,报错的原因可能和网络环境、跨域请求有关,不能确定是否是由即时通讯 SDK 引发。

ES2020 版本的 SDK 的引入方式请参考SDK 安装文档的 这个章节 (需切换为「即时通讯」)。

@musicode
Copy link
Author

musicode commented Jun 7, 2021

4.3.1 版本没有报这种请求错误,所以我不知道是哪个环节出错的

@musicode
Copy link
Author

musicode commented Jun 7, 2021

参考文档安装之后,项目无法启动

yarn add leancloud-realtime @leancloud/platform-adapters-react-native

WX20210607-143754@2x

@musicode
Copy link
Author

musicode commented Jun 7, 2021

我是真的挺想升级的,SDK 不给我机会啊

@sdjdd
Copy link
Contributor

sdjdd commented Jun 7, 2021

我后续会验证下 5.0 的 SDK 在 React Native 平台的兼容性。

@leeyeh
Copy link
Contributor

leeyeh commented Jun 7, 2021

也请提供一下你用的 React Native 的版本。

@musicode
Copy link
Author

musicode commented Jun 7, 2021

react-native版本:0.64.2

@musicode
Copy link
Author

请问这个问题在 5.0.0-rc.7 修复了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants