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

[BUG] 10004 Resource load not complete #26

Open
busyit opened this issue Mar 25, 2025 · 14 comments
Open

[BUG] 10004 Resource load not complete #26

busyit opened this issue Mar 25, 2025 · 14 comments

Comments

@busyit
Copy link

busyit commented Mar 25, 2025

OpenIM Server Version

client-sdk 0.0.11

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

调用IMSDK.login登录成功过一次之后,第二次加载的时候我不调用登录接口,直接调用获取会话列表,返回失败: 10004 Resource load not complete,这种情况是怎么回事呢

Image

Image

小程序不需要初始化,问题只能是第二种了,即登录接口还未成功返回,用OnConnectSuccess方法,第一次login的时候会触发,但是第二次加载的时候怎么触发OnConnectSuccess这个事件呢,现在我感觉主要卡在这里了

Screenshots Link

No response

@Bloomingg
Copy link
Member

What does the second loading refer to? Is it reopening after closing or pulling up from the background?
Note: You need to ensure that the same SDK instance is used when calling the API.

@busyit
Copy link
Author

busyit commented Mar 25, 2025

Image

我加了个标志位,第二次加载的时候就直接返回调获取用户会话接口了

Image

Image

@Bloomingg
Copy link
Member

I don't know what you mean by "the second time".

@busyit
Copy link
Author

busyit commented Mar 25, 2025

能不能说中文呢,第一次获取token的时候调用下login接口,然后重新刷新页面不就是第二次了

@busyit
Copy link
Author

busyit commented Mar 26, 2025

人呢,where are you

@busyit
Copy link
Author

busyit commented Mar 26, 2025

Image
10004的问题要怎么解决呢

@busyit
Copy link
Author

busyit commented Mar 26, 2025

还在吗?方便用其他方式沟通下吗?这样处理问题好慢呢

@Bloomingg
Copy link
Member

If page refreshing is involved, the login status of the SDK will be lost and you need to log in again.

@Bloomingg
Copy link
Member

It seems that you are using it in uniapp. For example, you should complete the login first in the onLaunch callback of App.vue.

@busyit
Copy link
Author

busyit commented Mar 26, 2025

我是用uniapp来做的小程序,引用的是@openim/client-sdk

@busyit
Copy link
Author

busyit commented Mar 26, 2025

It seems that you are using it in uniapp. For example, you should complete the login first in the onLaunch callback of App.vue.

但是刷新页面我不调login也是同样的效果吧,但是不调login直接调获取会话列表,就报resource load not complete

@Bloomingg
Copy link
Member

After refreshing the page, you need to log in first before calling other APIs.

@busyit
Copy link
Author

busyit commented Mar 26, 2025

刷新如果调用login的话,会报lgoin repeat异常

@Bloomingg
Copy link
Member

So this is not a real refresh. Is it a hot update? You can try refreshing the WeChat Developer Tools.

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

2 participants