Skip to content

[BUG] uniapp hot update will cause initialization twice, causing calls to send messages and join group chats to use the path returned by getDbDir() last time #3615

@qfccjj

Description

@qfccjj

OpenIM Server Version

1.4.0

Operating System and CPU Architecture

Windows (AMD)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

uniapp的im,在app更新的时候,安装完包后更新,走到最后会执行plus.runtime.restart()。
在这个时候uniapp会重新走一遍onLaunch,又执行了一次initSDK,导致openim在发消息和加入群聊的时候报无法操作数据库的错误。
我查看了问题,是第二次initSDK调用getDbDir()后,返回的path路径更新了,但是发送消息依然用的是第一次的获取的路径,想通过uninitSdk要解决,但是依赖包里面没有这个方法

Screenshots Link

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions