Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

WebGL "To use dlopen, you need to use Emscripten's linking support"

Discussion in 'WebGL' started by PerfectDream, May 9, 2019.

  1. PerfectDream

    PerfectDream

    Joined:
    Jan 27, 2019
    Posts:
    1
    I've seen a tread here about this problem (2 years old), but not really how to fix this.

    My game is rendered in Chrome when use the "Build and run" -WebGL.

    I've managed to play it without ANY Problem before I adding SQLite. (The game works really good in the editor.)

    My game starts as expected when I run it through "build and run" but I get this error when trying to login using SQLite:
    "To use dlopen, you need to use Emscripten's linking support".

    If I close the browser and open up the Index.html and get the C:\\path the view is gray and no error is appealing in the console.

    Unity version: 2018.3.0f2
     
    Twyker_gp likes this.
  2. rudylee94

    rudylee94

    Joined:
    Sep 8, 2015
    Posts:
    5
    it may be some plugins can not work in web brower,try delete them or don't use them in your code.
     
  3. assaf_hershko

    assaf_hershko

    Joined:
    May 20, 2017
    Posts:
    9
    I had a similar issue. My understanding (following some digging) is that SQLLite uses threading which isn't supported by Unity in WebGL.

    Personally I solved it by avoiding the use of SQLLite (I used serialised files instead). If you insist on SQLLite, you can perhaps try something like:
    https://assetstore.unity.com/packages/tools/integration/libsqlite-66906
    (See the line "Do not use threads to allow WEBGL compatibility")
    But I have no idea if it's working well, as I didn't try it myself.
     
  4. ageekYT

    ageekYT

    Joined:
    Sep 24, 2020
    Posts:
    1
    i am getting this error can you please take a look

    An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was: abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at jsStackTrace
     

    Attached Files:

  5. jukka_j

    jukka_j

    Unity Technologies

    Joined:
    May 4, 2018
    Posts:
    944
    The error is a bit of an awkward one, and wrongly positioned. Usually the error means that some part of the code is missing from the build. The build is attempting to load up a .dll file, but we do not use .dll files in the first place in web builds, because of the high performance and code size cost that they carry in WebAssembly. Instead all code needs to be statically linked into the binary.

    I revised the error message just recently so that it no longer gives this red herring information.

    To fix this particular situation, likely you will need to contact SQLLite for support to add web build capability to the library.
     
    throzen and Bshsf_9527 like this.
  6. Hines94

    Hines94

    Joined:
    Feb 15, 2020
    Posts:
    19
    Is there no way to take the performance hit and get the dll's running anyway?

    This is impacting the ability to reach AWS services, which basically means that my project is dead in the water so I would take any option at this point
     
  7. Bshsf_9527

    Bshsf_9527

    Joined:
    Sep 6, 2017
    Posts:
    42
    do not use dllimport attribute ,you need a backend ,with backend,they can give what you want in the sql,just by sending them a webrequest.