Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • Bugs /
avatar image
Question by DandelionGames · Sep 02, 2019 at 03:45 AM ·

Playfab + Unity 2019 WebGL with development build

I'm trying to run the memory profiler on a webgl build that has started leaking memory since we attempted to port to the new version of unity (2019.2.2f1) and when we turn on the development build and tick the autoconnect profiler and then build, we get an error (a regular build works fine, other than the pretty big memory leak). Well, after basically just making a whole different package and ripping massive chunks out until I could build, it turns out this whole thing doesn't like playfab.

I provided my test project at http://dandeliongames.com/playfabl/playfabwebgldev.zip

My test is just a 'hello world' project that is just a textmeshpro GUI label saying hello world, compiles fine, install playfab sdk and attempt the development build and I get the error. The short version of the error is...

Failed running "F:/UnityEditors/2019.2.0f1/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe" -E "F:/UnityEditors/2019.2.0f1/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten\emcc" @"F:\UnityProjects\WebGLDevCompile\Assets\..\Temp\emcc_arguments.resp"

stdout:
stderr:warning: unexpected number of arguments 1 in call to '__cxa_pure_virtual', should be 0warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 5 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 4 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 2 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0warning: unexpected number of arguments 3 in call to '_ZN6il2cpp6icalls8mscorlib6System6String22RedirectToCreateStringEv', should be 0error: unresolved symbol: _ZN6il2cpp2os9Semaphore11GetOSHandleEvAborting compilation due to previous errors | undefinedTraceback (most recent call last): File "F:\UnityEditors\2019.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py", line 3063, in <module> sys.exit(run()) File "F:\UnityEditors\2019.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emcc.py", line 1780, in run final = shared.Building.emscripten(final, append_ext=False, extra_args=extra_args) File "F:\UnityEditors\2019.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\shared.py", line 2274, in emscripten emscripten._main(cmdline) File "F:\UnityEditors\2019.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2233, in _main return temp_files.run_and_clean(lambda: main( File "F:\UnityEditors\2019.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\tempfiles.py", line 93, in run_and_clean return func() File "F:\UnityEditors\2019.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2238, in <lambda> DEBUG=DEBUG, File "F:\UnityEditors\2019.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 2164, in main temp_files=temp_files, DEBUG=DEBUG) File "F:\UnityEditors\2019.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 86, in emscript glue, forwarded_data = compiler_glue(metadata, libraries, compiler_engine, temp_files, DEBUG) File "F:\UnityEditors\2019.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 218, in compiler_glue glue, forwarded_data = compile_settings(compiler_engine, libraries, temp_files) File "F:\UnityEditors\2019.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\emscripten.py", line 541, in compile_settings cwd=path_from_root('src'), error_limit=300) File "F:\UnityEditors\2019.2.0f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\tools\jsrun.py", line 132, in run_js raise Exception('Expected the command ' + str(command) + ' to finish with return code ' + str(assert_returncode) + ', but it returned with code ' + str(proc.returncode) + ' instead! Output: ' + str(ret)[:error_limit])Exception: Expected the command ['F:/UnityEditors/2019.2.0f1/Editor/Data\\Tools\\nodejs\\node.exe', '--stack_size=8192', '--max-old-space-size=4096', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\Emscripten\\src\\compiler.js', 'C:\\Users\\Dan\\AppData\\Local\\Temp\\tmpvjnynz.txt', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Audio.js', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Cursor.js', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Eval.js', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\FileSystem.js', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Logging.js', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Profiler.js', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\SystemInfo.js', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\UnetWebSocket.js', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\Video.js', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebCam.js', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\lib\\WebRequest.js', 'F:\\UnityEditors\\2019.2.0f1\\Editor\\Data\\PlaybackEngines\\WebGLSupport\\BuildTools\\Emscripten\\src\\library_pthread_stub.js'] to finish with return code 0, but it returned with code 1 instead! Output: // The Module object: Our interface to the outside world. We import// and export values on it. There are various ways Module can be used:// 1. Not defined. We create it here// 2. A function parameter, function(Module) { ..generated code.. }// 3. pre-run appended it, var Module = {}; ..generated
Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by SethDu · Sep 06, 2019 at 02:48 AM

After few days attempts, I have fix the previous issue and am able to build a project on WebGL. It seems to be the problems in 2019 Editor. Then I try to build your project (also create a new project and only import PlayFab SDK), the same error you posted occurs.

In other words, I have reproduced your issue and this only occurs on the 2019 version of Unity. I will file a bug and may contact the SDK team to take a look at your issue. This thread will be updated if there is any feedback from the team.

Comment

People who like this

0 Show 3 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DandelionGames · Sep 06, 2019 at 04:26 AM 0
Share

Thanks, I look forward to using 2019 at some point, playfab is just too good a service.

avatar image goldbug · Sep 29, 2019 at 04:49 PM 0
Share

Any progress on this issue? I ran into it too

avatar image FranklinChen ♦ goldbug · Sep 30, 2019 at 01:40 AM 0
Share

Hi @goldbug, we got the update from engineering team, this is a Unity Editor 2019 issue. They tried to inform Unity team in Unity issuer tracker. Here is a related one: https://issuetracker.unity3d.com/issues/webgl-building-fails-with-emscriptens-python-failure

avatar image

Answer by SethDu · Sep 02, 2019 at 08:47 AM

May I ask how do you implement and use PlayFab SDK? I download your project but there is no script that refers PlayFab APIs. Meanwhile I cannot see any errors that is related to PlayFab in the messages you have posted.

Comment

People who like this

0 Show 0 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by DandelionGames · Sep 03, 2019 at 02:15 AM

In the main project it's used for storing player data and steam purchases run through playfab, but in this case, it's a simple test that at least for me shows a problem. In this test, all I do is add the playfab API and the problem starts immediately. Were you able to do a webgl developer build (with autoconnect to profiler) using my project? That'd at least point to it being something specific to my machine if you can, however, the other guy who I work with had the same issue with building the project. The error I posted is part of the 'generated code' and not something directly out of playfab itself, but something that is triggered by having the playfab SDK in the project.

The 'typical' situation for something like this is that a needed .dll or .jslib file is not in the project and causes something similar, however it'd say something more useful like SomeFunctionThatExistsInCode that is using extern/importdll with it and the actual external file is not available, though in this case it's not.


Anyway, let me know if you were able to do a webgl build with the development build and autoconnect profile options on, if not, delete the playfabsdk directory and then try again and that's why I'm here, because the build succeeds without playfab API in the project.

Comment

People who like this

0 Show 3 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image SethDu ♦ · Sep 03, 2019 at 08:46 AM 0
Share

We have a testing WebGL project which is in Unity 2018.2.17f1. There is no error reporting and we are able to make any API calls. In fact, so far I cannot create a WebGL build on 2019 version of Unity, due to some error related to il2cpp.exe. Try to fix it but no good.

Can you try to create a Unity 2018 project to see if these error still occurs. Additionally, it will be good if you can try to contact with Unity technical supports and mention about error with Python. I have seem few threads about it.

After that, if this issue is not related to the version of Unity. We will ask the team about the compatibility of the PlayFab Unity SDK.

avatar image DandelionGames SethDu ♦ · Sep 03, 2019 at 01:51 PM 0
Share

Oops, I guess my previous post was as an answer not a reply to you... I'm bad at forums. Our main project was on 2018.2.2f1 and we were trying to upgrade to the latest due to getting some reports that a windows 10 update causes the game to break (we tried a few other things and it did happen to a few different users right after the windows update). It was the switch to 2019 where we suddenly had a pretty significant memory leak that we needed to be able to check the profiler for (it works great for windows, better than 2018 significantly, but well, the webgl memory leak is pretty bad). We've got a bunch of bug fixes and what not so we'll give it a try with an updated version of 2018 instead of 2019 and maybe that'll take care of our original problem.

I really don't know how to go about reporting the problem to unity, I'd kind of expect them to just say hey, that looks like a problem with playfab since it happens with playfab code (like I said, empty project, add the playfab SDK, and something is missing). It seems like 'semaphore' is the issue, there are warnings about mscorlib but the error is on semaphore and unlike mscorlib no mention of semaphore as a dependency anywhere.

avatar image DandelionGames SethDu ♦ · Sep 03, 2019 at 03:45 PM 0
Share

2018.2.21f compiled with the web developer build using .net 3.5 scripting runtime and for science I also tried the .net 4.0 scripting version and, it seems to have worked as well. I guess I'll give other major releases a shot too to see how close to the current runtime I can go without trouble. Here's to hoping that the windows issue and memory issue are both resolved on this version.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    6 People are following this question.

    avatar image avatar image avatar image avatar image avatar image avatar image

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges