Skip to content

emscripten global handling of onmessages causes conflicts with other apps #17844

@vladmandic

Description

@vladmandic

emscripten registers a global message handler on initialization,
so if any other js app uses messages, it will result in errors being printed constantly

worker.js received unknown command

root cause is https://github.com/emscripten-core/emscripten/blob/main/src/worker.js#L288

pr #16450 fixed this exact issue for library_pthread.js,
but same (or similar) fix should be done for worker.js as the code flow there is nearly identical

environment: emscripten 3.1.20 on chrome 104

link to issue in tensorflow/js exposed due to this: tensorflow/tfjs#6687

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions