Skip to content

调用 WX.SetDeviceOrientation 后再 微信开发者工具里面报错 #998

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

Open
deviltornado opened this issue May 15, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@deviltornado
Copy link

描述Bug

如题,调用 WX.SetDeviceOrientation 后再 微信开发者工具里面报错
报错信息如下
MiniProgramError
Cannot assign to read only property 'innerWidth' of object '#'
TypeError: Cannot assign to read only property 'innerWidth' of object '#'
at Function. (http://127.0.0.1:49961/game/plugins/screen-adapter.js:10:21)
at Function.t (http://127.0.0.1:49961/game/__dev__/WAGameSubContext.js:1:178506)
at
at c. (http://127.0.0.1:49961/game/__dev__/WAGame.js:1:209054)
at c.emit (http://127.0.0.1:49961/game/__dev__/WAGame.js:1:513760)
at Object.emit (http://127.0.0.1:49961/game/__dev__/WAGame.js:1:321588)
at http://127.0.0.1:49961/game/__dev__/WAGame.js:1:322288
at http://127.0.0.1:49961/game/__dev__/WAGame.js:1:533400
at http://127.0.0.1:49961/game/__dev__/WAGame.js:1:550248
at Object.emit (http://127.0.0.1:49961/game/__dev__/WAGame.js:1:126384)
at c (ide:///extensions/appservice/index.js:1:12880)
at l (ide:///extensions/appservice/index.js:1:13019)
at ide:///extensions/appservice/index.js:1:83446
at Set.forEach ()
at g (ide:///extensions/appservice/index.js:1:83429)
at e.exports.p (ide:///extensions/appservice/index.js:1:83477)
at ide:///extensions/appservice/index.js:1:101840
at Set.forEach ()
at WebSocket._ws.onmessage (ide:///extensions/appservice/index.js:1:101821)(env: Windows,mg,1.06.2503281; lib: 3.5.1)
e.printErr @ plugin.js:93
(anonymous) @ unity-namespace.js? [sm]:123

运行环境

Windows11/Unity2022.3.55f1c1/minigame.202505070335/Package导入/WebGL
@deviltornado deviltornado added the bug Something isn't working label May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant