Errors when trying to load addressables in WebGL - unity3d

Using addressables and building for WEBGL in Unity 2019.2.18f, but getting errors no matter what I do when I try run a build.
I'm storing my build and the addressable files in the same bucket on Google Cloud. Remote path is set to the gs:// path for the files. I've also tried replacing GS with https://storage.googleapis.com/mybucketname.
When I open the index.html in its path on google cloud, it gives me a CORS error. I've tried adding a json file and setting it up using gsutil but gsutil gives me an error - the file does not exist. I don't really want to go down a rabbit hole with gsutil as I'm not even sure if CORS is the only issue
I have also opened the build in firefox and I don't have a CORS error but I do have another error,
Asset Bundle download is complete, but no data have been received
Exception encountered in operation Resource<IAssetBundleResource>(packedassets_assets_all_73fe17b324c832211bd83ddaec912952.bundle), status=Failed, result= : RemoteAssetBundleProvider unable to load from url gs://theURLofthebucket/WebGL/bundlename_73fe17b324c832211bd83ddaec912952.bundle, result='Unknown Error'.
I have even tried switching the build target to standalone, re-building the addressables for this target, uploading them for the new target, and building. I thought this might give me a hint, if it just WORKED for standalone, but it doesn't, I get this error:
Curl error 1: Protocol "gs" not supported or disabled in libcurl
(Filename: C:\buildslave\unity\build\Modules/UnityWebRequest/Implementations/TransportCurl.cpp Line: 799)
Exception encountered in operation Resource<IAssetBundleResource>(packedAssets_7b4d2d2ed91df92408ade3f19317f33f.bundle), status=Failed, result= : RemoteAssetBundleProvider unable to load from url gs://mybucketname/StandaloneWindows64/packedassetsassets_7b4d2d2ed91df92408ade3f19317f33f.bundle, result='Unknown Error'.
To load the addressables (which have ranged from a basic cube, a model from my project, and a scene), I've used both instantiate, which is obsolete, instantiateAsync, which I think may not work in Webgl although it was given as the example to use in a tutorial, and I've also tried loading a scene that was marked addressable, using
Addressables.LoadSceneAsync(address, LoadSceneMode.Additive).Completed += OnSceneLoaded
Is what I'm trying to do possible? Use webgl and hosted addressable assets?
What's not obsolete? I keep finding tutorials and questions but the fixes / code used just don't work. I think I've wasted a good bit of time trying different things that I'm not sure if they are even possible to get working.
I've tried version 1.10, 1.15.1, 1.16.1. I've scoured the forums. I tried asking on discord for one of the tutorials (badgerdox) but got no response.
Please any pointers would be great!
I'm really stuck, and willing to try anything (could asset bundles work instead?) but afraid of wasting any more time if it's a dead end as this is for work. Thanks for any help!

At the moment Addressables doesn't support "gs" protocol.
Here is the official answer from Unity
The short answer from Unity:
UnityWebRequest doesn't support "gs://", which means for now we do not. Long term we are going to write a new downloading & caching layer, but for now we have what we have.
A workaround could be to change "gs://" to "https://storage.googleapis.com/"
More detail you can read in this thread.

Related

Having and error with dart2js as a result of dash_chat

dart2js error with dash_chat
One of our existing applications makes use of dash_chat, which is working on a V2, however, v2 has a fraction of the APIs implemented. The project is somewhat dormant so today we just doing housekeeping and trying to keep the project up-to-date.
I am now getting this error, and sadly I went and updated all packages and we are using FLutter 3 and Dart 2.17 in all our other projects.
Target dart2js failed: Exception: Warning: The 'dart2js' entrypoint script is deprecated, please use 'dart compile js' instead.
So not sure which of the many things I changed is ultimately the cause of this issue, which crops up when trying to build for web.
No relevant issues on the DC repo and google is being very unhelpful on this one, was hoping someone had some insight that would allow me to take the correct steps forward (or back if need be) to get around this.
TIA

How do I determine why the temp files are not being created?

Update: While a root cause has not been determined for these errors. I have been able to fix my issues via reimporting and reinstalling the Google AdMob Manual SDK all together.
New to this whole Stackoverflow, not sure if I should make that as the answer?
I'm attempting to install the Google AdMob module into my SwiftUI iOS application using the Manual SDK method located on their documentation page. The project throws no errors until I build the project, at that time it tells me "Build Succeeded" then tells me the below error. When I navigate to the path, I can get to the following directory however, there is no further file there...
/Users/PROFILE/Library/Developer/CoreSimulator/Devices/DEVICE_UUID/data/Library/Caches/com.apple.mobile.installd.staging
I have ensure that the Info.plist is in the directory. I have also verified that the path is proper via the Build Settings.
Please try again later.
Failed to load Info.plist from bundle at path /Users/PROFILE/Library/Developer/CoreSimulator/Devices/DEVICE_UUID/data/Library/Caches/com.apple.mobile.installd.staging/temp.z14Qmt/extracted/HealthCalc.app/Frameworks/GoogleMobileAds.framework;
Extra info about "/Users/PROFILE/Library/Developer/CoreSimulator/Devices/DEVICE_UUID/data/Library/Caches/com.apple.mobile.installd.staging/temp.z14Qmt/extracted/HealthCalc.app/Frameworks/GoogleMobileAds.framework/Info.plist":
Couldn't stat /Users/PROFILE/Library/Developer/CoreSimulator/Devices/DEVICE_UUID/data/Library/Caches/com.apple.mobile.installd.staging/temp.z14Qmt/extracted/HealthCalc.app/Frameworks/GoogleMobileAds.framework/Info.plist: No such file or directory
While a root cause has not been determined for these errors. I have been able to fix my issues via reimporting and reinstalling the Google AdMob Manual SDK all together.
In doing so I followed the Manual SDK Instructions, particularly I believe the root issue was some funky indentation or mishap in the Info.plist. That being said, if you run into a similar issue, I urge you to take a step back. Start a fresh blank project and attempt to implement the Google AdMob procedures in the blank project. This will eliminate the concern that your current code is causing any conflicts. Once completed and you have it working, mimic the steps within your core project.

Build Visual Studio project fails - The cloud operation was unsuccessful

I'm using two laptops and stored my C# code in OneDrive.
I am aware that sharing code via OneDrive is not be the best approach, but that's what I'm dealing with now.
I noticed that on laptop 1 I have to define the following path to the data file (mdf):
C:\Users\ Diet\OneDrive\Personal\VisualStudio2019\Repos\project\project\App_Data\data.mdf
On laptop 2, the path is different because the user I'm logged in with has a different name (or at least that's what I believe is the cause)
C:\Users\ Dieter\OneDrive\Personal\VisualStudio2019\Repos\project\project\App_Data\data.mdf
Updating this in the Web.config fixed the connection to the database, BUT building the solution still returns an error, also related to a cloud operation, hence why I think it is caused by the path in OneDrive...
The error message:
CSC : error CS0041: Unexpected error writing debug information -- 'The cloud operation was unsuccessful.
I welcome your insights. Thank you for helping me out.
I have my projects stored in OneDrive and had this same issue. The fix was to set the entire Project folder contents to "Always keep on this device".
Seems that building the solution in VS was attempting to write to files that were not cached locally from OneDrive. As soon as I changed the setting, the build worked!
I was also storing my project on OneDrive, got the same error after installing a new ssd.
Rebuilding the solution was enough for me.

Asset Catalog Compile Error with On-Demand Resources: has no output specification

I've been trying to get On-Demand Resource to work but I keep getting this compile error:
/* com.apple.actool.errors */
: error: The tag combination "tagName" for "xxx.imageset/xxx#3x.png" has no output specification.
I had a look at actool man page and there's an option:
--asset-pack-output-specifications filename
Which says:
Tells actool where to write the information about ODR resources found
in the asset catalog. The emitted file will be a plist.
But I'm not really sure what to put as an argument/where this plist is used or even if this option is in the right track of fixing the error.
My coworkers and I struggled with this error for over a day and were only able to fix it by wiping our existing local repos and installing a fresh clone from our remote repos with the code that contains the on-demand resources.
In our case, I was the one that created the on-demand resources functionality and did the tagging for the assets. I built and ran all of that code, and everything worked fine locally on my machine. I pushed those commits to our remote, and when my coworkers pulled they received the asset catalog compile error that you reported when they tried to build.
I compared my build logs with those of my coworkers and found that I had the --asset-pack-output-specifications flag along with a filename whereas they did not, even though all of our production code was the same. I never set that flag manually myself during development, it was automatically generated at some point in the process but I have no idea where -- I didn't even know it existed until this build failure occurred. After struggling for many hours we noticed that if my coworkers deleted their local projects entirely and basically started fresh by installing a new project and repo again from the remote, they suddenly were able to build. They had already tried to clean and nuke their derived data, but that didn't work. Only totally deleting the repos and the projects entirely did the trick. Not sure why, but something about wiping the project and all associated directories and building themselves totally fresh from their own local machines triggered something that enabled the --asset-pack-output-specifications flag.
I just faced this issue and was totally against deleting my repo and cloning again.
I noticed that alongside this error, I also got a warning stating that I had assets under the same name (thus being duplicated).
Deleting the duplicated asset in order to get rid of the warning, fixed the compilation error.
Hope this helps someone, as deleting the repo and cloning again shouldn't be an option.
I just faced the issue.
I could solve it just by deleting on-demand resource tags and tagging them back again.
I just solve it by rebooting Xcode then run successfully. The error seems to only appear once...I don't know why.

How can I fix this Android SDK build problem in Eclipse?

I am using Eclipse for Android dev and everything was going fine until I tried to incorporate the facebook SDK. Now when I tried to back it out, there appears to be an artifact left behind that Eclipse tries to link the FB library?!?
[2010-11-17 18:50:22 - Library Project] Unable to set linked path var '_android_com.facebook.android' for library /Users/mobibob/Projects/workspace/facebook-android-sdk/facebook: Path variable name cannot contain character: ..
Any clue where this command / reference is in the build configuration? I have scoured it as best that I can, but I still get the same error.
Problem solved ... as it turns out, it was not so much the Facebook SDK but something that I did in the process of configuring the library reference. I am not entirely certain of how I misconfigured, but I was tweaking the various "path" settings such that, once when the automatic build tried to build my project, an import for android.R was added to my source module. This superseded com.myproject.R and would not resolve the values for resource references.
There were other problems with path order and setting that I modified during the troubleshooting that made it worse. Recreating the project without Facebook was the first step to discovery and fixing.
Either way, the lesson I learned is that the build error messages can misdirect one to the configuration when the problem is in the source code.