openimsdk / open-im-sdk-web-wasm

JS SDK for OpenIM Web use by Webassembly of go
https://openim.io
Apache License 2.0
35 stars 49 forks source link

[BUG] errors.withStack not implement CodeError: not load resource: 10004 ResourceLoadNotCompleteError #103

Closed wikylyu closed 4 months ago

wikylyu commented 4 months ago

OpenIM Server Version

3.7.0

Operating System and CPU Architecture

Linux (AMD)

Deployment Method

Docker Deployment

Bug Description and Steps to Reproduce

我用这个库配置了Angular的项目,worker.js也载入了。下面是初始化的代码。

    this.openim.sdk.on(CbEvents.OnConnecting, () => {
      console.log('connecting');
    });
    this.openim.sdk.on(CbEvents.OnConnectFailed, (r: any) => {
      console.log('connect failed', r);
    });
    this.openim.sdk.on(CbEvents.OnConnectSuccess, () => {
      console.log('connect success');
    });

  this.openim.sdk.login({
          userID: this.userID,
          token: this.token,
          platformID: 5,
          apiAddr: 'http://192.168.18.100:10002',
          wsAddr: 'http://192.168.18.100:10001',
  });

这是浏览器控制台的报错,我查了很久也不知道怎么回事。 Screenshot from 2024-07-26 13-38-32

Screenshots Link

No response

wikylyu commented 4 months ago

Screenshot from 2024-07-26 15-16-13

wikylyu commented 4 months ago

这个错误是因为登录的时候参数错误导致的,具体来说是 wsAddr或者apiAddr的协议错误