Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Building in Unity fails with: Burst internal compiler error: Burst.Compiler.IL.CompilerExceptionAssemblyResolution: Unable to resolve type System.Runtime.CompilerServices.IsReadOnlyAttribute. Reason: Unknown. #104

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
GrimLothar opened this issue Sep 4, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@GrimLothar
Copy link

Bug report

Describe the bug

The library seems to be working fine within the Editor, but as soon as I try to make an actual build, I get like 13 of these errors:

Burst internal compiler error: Burst.Compiler.IL.CompilerExceptionAssemblyResolution: Unable to resolve type `System.Runtime.CompilerServices.IsReadOnlyAttribute. Reason: Unknown.`

Sometimes I also get

Library/Bee/artifacts/MacStandalonePlayerBuildProgram/AsyncPluginsFromLinker: Failed to find entry-points:
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun () (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindow.cs:189)

But not always...

To Reproduce

I tried installing using the steps described here: https://github.com/supabase-community/supabase-csharp/wiki/Unity

And also using the NuGet for Unity package: https://github.com/GlitchEnzo/NuGetForUnity

Both result in the same outcome.

System information

  • OS: macOS 13.5.1 (22G90)

I'm attaching the full Editor.log file so you can see all the errors. (too big to just post as text)

Editor.log

@GrimLothar GrimLothar added the bug Something isn't working label Sep 4, 2023
@wiverson
Copy link
Collaborator

wiverson commented Sep 4, 2023

Ugh, probably something wrong with the dependencies. There might be too many conflicting ones.

Try opening and running this template, LMK if it works. https://github.com/wiverson/supabase-unity-template

In particular, check to see if your dependencies match https://github.com/wiverson/supabase-unity-template/tree/main/Assets/Supabase - my guess is you are pulling in too many and something is conflicting/not resolving.

@GrimLothar
Copy link
Author

Ok, good news is that the template built without issues... I'm going to try to copy over the dependencies and let you know how it goes. Thank you for the quick reply!

@GrimLothar
Copy link
Author

Screenshot 2023-09-04 at 4 14 39 PM although the lists looks completely identical... maybe something weird inside one of the packages

@GrimLothar
Copy link
Author

GrimLothar commented Sep 4, 2023

Alright, good news again. Copying over the Supabase folder from that project made the build work! (just wish I didn't waste all day trying to fix is myself before posting here lol)
So something is getting messed up when going the raw installation route.

Happy to help debug that if you want! But otherwise, i'm good now!

Will leave open depending on how you want to proceed

@wiverson
Copy link
Collaborator

wiverson commented Sep 4, 2023

I just updated the docs a bit to try to help clarify https://github.com/supabase-community/supabase-csharp/wiki/Unity

If you are good go ahead and mash that close button! :)

@GrimLothar
Copy link
Author

hey @wiverson sorry to hijack my own ticket, but what is the best way to ask for some questions that are not really a bug?

Specifically right now i'm wondering how to properly handle winding down a realtime connection and then recreate it.

I see that a channel has RemovePostgresChangeHandler and Unsubscribe. Also see that RealtimeBroadcast has ClearBroadcastEventHandlers What I'm not finding is how to Unregister a broadcast on a channel. and since I didn't do that, i just run into this error:

InvalidOperationException: Register can only be called with broadcast options for a channel once.

Any tips on best practice here would be appreciated! (and where should I ask these things in the future :D )

@GrimLothar GrimLothar reopened this Sep 5, 2023
@acupofjose
Copy link
Contributor

@grimAgent the best place would be on the discussions.

Interesting! At the moment, there's not a way to remove a channel's broadcast registration. I haven't had anyone ask to do that yet haha.

To get around it, you could go to the main realtime client and just remove the channel (which unsubscribes it as well) and create a new one later for what you're doing.

Supabase.Realtime.Remove(Channel channel);

The idea, at least for our client right now, is that a channel would provide one particular kind of broadcast structure. Since Realtime supports any arbitrary channel name, you would just make a different channel for a different kind of broadcast structure.

@GrimLothar
Copy link
Author

Perfect! Thank you @acupofjose will try that out and follow up in discussions if needed.
Thanks!

@kaushalkumar86
Copy link

Hi, I am also getting this error after update, using .net2.1
When followed steps mentioned by @grimAgent , I an getting another error as tasawaiter does not implement....

@supabase-community supabase-community locked and limited conversation to collaborators Sep 15, 2023
@wiverson wiverson converted this issue into discussion #109 Sep 15, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants