Could not securely load assembly (Unity 4.5.1 + Facebook Unity SDK 5.1) - unity3d

I've just updated Unity from 4.3.4 to 4.5.1 and got this error with Facebook Unity SDK 5.1:
Could not securely load assembly from https://integrated-plugin-canvas-rsrc.fbsbx.com/rsrc/unity/lib/sdk_5.1/CanvasFacebook.dll
I tried the fix explained in Unable to verify assembly data; you must provide an authorization key when loading this assembly but was unable to comment (not enough reputaion) so had to ask a new question.
string key = "B8GvecdX0rQ47kzhCEwlrRzYKA8LKeiZxy1HI3HfnhdgUATvBwQQViji8ot44dADM55QuHk5+hwrLso" +
"au32IDmRDQTclMSsTsIywGRo/nE5vbmRMMIECYXBFhliz+kvK0RWZ57XPxw0s7YhGnNLav0EE2QH/m+9a" +
"jlLOY+2ckxSoSEHLpotllyZLktRK+oFiDPvmzXLDUMOnwK9RFRSh2VBmoyWTZx8BYqWjqug3kAljJk/Xw" +
"TYZT9Ie+HvzLO5DBSqMNYbEX03WaNfpaq9GKBF/Oz37AHelf1Es36amP1v2Aut3nmIk2xxN6zwzBXyEyw" +
"90vJ/O8suikU+8kDDbZA==";
var assembly = Security.LoadAndVerifyAssembly(www.bytes, key);
Note that I added the fix code into the UNITY_4_5 section.
Is the key now wrong as it was given back in March?
I should note that I only see this error in one project. I have another project that also uses the Facebook Unity SDK but I don't see the error in that one.
UPDATE:
As of Monday 30 June the original issue seems to have been resolved. There's now no problem loading the assembly via the original code.
UPDATE 2:
Actually I've seen the secure load fail a few times since, but not always.

Related

Unity3d Issue - Assembly will not be loaded due to errors: X references strong named Y Assembly references: 10.0.0.0 Found in project: 13.0.0.0

I have an issue with a dll im using inside unity3d.
Im trying to use the jose-jwt.dll
link to the library:
https://www.nuget.org/packages/jose-jwt-forunity/
and when I'm importing it into unity3d I get this error:
Assembly 'Assets/jose-jwt.dll' will not be loaded due to errors:
jose-jwt references strong named Newtonsoft.Json Assembly references 10.0.0.0 Found in project: 13.0.0.0.
Assembly Version Validation can be disabled in Player Settings "Assembly Version Validation"
now from my understanding the jose-jwt.dll have a dependency of at least version of 10.0.0.0 of the Newtonsoft.Json, so why this error occurs and how should I fix it?
Unity3d has its own Newtonsoft.Json from what i can tell.
I need it to create a JWT and send it to an api server.
Thanks for the help!

ESType error when ModelDrivenControllerBase is using to call MDrivenEcoSpaceAndModelForNetStandard

a code MyController:ModelDrivenControllerBase<EcoProject1EcoSpace> in the mvc or webapi netcore project shows a error "the type 'MDrivenTemplateProj.EcoProject1EcoSpace' cannot be used as type parameter 'ESType' in the generic type or method 'ModelDrivenControllerBase<ESType>'. There is no implicit reference conversion from 'MDrivenTemplateProj.EcoProject1EcoSpace' to 'Eco.Handles.DefaultEcospace" + annoying request to add ref to the 'MDriven.Handles.netStandard, version=7.0.0.0, culture=neutral, publickeytoken=null'. (always version 7.0.0.0!)
Could you please advise how to avoid such kind of errors?
I'm trying to develop the webapi netcore 3.1 app that has ref to MDrivenEcoSpaceAndModelForNetStandard project using the NetFramework 4.x. experience.
Seems that is it wrong way for the netcore project.
Thank you!
Brand new MDriven packages on nuget targeting .netStandard2.1 and .net5 available now.
They have correct build version numbers, and are more granular in packages than the old Eco package.
https://wiki.mdriven.net/index.php/MVC
https://www.nuget.org/packages?q=MDriven*
Old style still valid:
ref to the MDrivenEcoSpaceAndModelForNetStandard project in your netcore webapi
leave ControllerBase as a base class for your MVC controller
create and activate new ecospace in the constructor of your controller
_es = new MDrivenTemplateProj.EcoProject1EcoSpace();_es.Active = true;
you can call CreateFromViewModel method if you want to use VMs, ex.
var vmc = Eco.ViewModel.Runtime.ViewModelHelper.CreateFromViewModel("SampleViewModel", this._es, null, false);
Manual fixes that are still required in MDrivenEcoSpaceAndModelForNetStandard project:
EcoProject1EcoSpace.Designer.cs - this.persistenceMapperSharer1.MapperProviderTypeName auto generated value is incorrect
EcoProject1PMP.Designer.cs - this.EcoSpaceTypeName auto generated value is incorrect
be ready that your build in VS EcoProject modeller will not be able to start persistence after the fixes above. It will show you "No suitable constructor found" message

ag-grid 'IToolPanel' is declared but its value is never read

after updating to version 19 and ag-grid-community package. I'm getting following error while running ng serve:
ERROR in node_modules/ag-grid-angular/src/interfaces.ts(20,5): error TS6133: 'IToolPanel' is declared but its value is never
read.
I couldn't find any other stackoverflow question / github issue created about it.
This issue happens when you have noUnusedLocals in your tsconfig enabled.
I've reported this to ag-grid team again and they recognized that as a bug. Fix should be released in v20 version by the end of 2018.

Using ZXing with Hololens

I've been trying to use Zxing on the Hololens but as soon as the app starts on the device, I get a fileloadException when this line is called:
BarcodeReader barcodeReader = new BarcodeReader();
FileLoadException: Could not load file or assembly 'System.Core,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
The located assembly's manifest definition does not match the assembly
reference. (Exception from HRESULT: 0x80131040) at
ZXing.BarcodeReader..ctor() at Decoder.Start() at
Decoder.$Invoke1(Int64 instance, Int64 args) at
UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64
args, IntPtr method) (Filename: Line: 0).
I have the Unity 2018.1.0b5 beta version with Visual Studio 2017 on Windows 10.
The Building works perfectly so the library is found.
Here's how I import ZXing library :
I've read all the other topics I found on it but the solutions provided do not work. I also tried to use the Zxing.winmd but the dll can't be found then.
Did I miss a step ? A file to download maybe ?
Thanks for your help !
After many configurations tried, I finally managed to use Zxing on Hololens by switching the scripting Backend in Player Settings to Il2Cpp. I was using .net (for the scripting backend) which caused me most of the errors. Il2CPP
If you don't have the IlCPP proposition, you might need to relaunch the Unity installer, making sure that "Windows Store Il2CPP " is checked.installation
I also downgraded my version of unity to 2017 in order to use the Holotoolkit which wasn't working on my 2018 beta version.
This way I don't need any specific settings to import Zxing in the Assets. Also, I didn't use Zxing.winmd but Zxing.unity.
settings Zxing
Tips : don't forget to unable the webcam and to deploy it in Visual Studio with "Release", otherwise it's going to slow down your app.
If Visual Studio doesn't find your Zxing.unity file, right click on your project in the Solution's Explorer (of Visual Studio) : Add->Reference->Find your Zxing.unity.

Foundation framework. No NSString.h file

I'm getting a few errors just after I updated my working copy via SVN.
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:8:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:8:32: error: Foundation/NSString.h: No such file or directory
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:45:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSCharacterSet.h:45: error: expected ')' before 'unichar'
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSPathUtilities.h:10:0 /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSPathUtilities.h:10: error: cannot find interface declaration for 'NSString'
All that errors tell that compiler is unable to find NSString.h file in Foundation framework and I have opened the Foundation framework in Xcode/Frameworks/Foundation.framework/Headers and noticed that there is no NSString header file there. Could anyone tell me what happened? I tried to delete the framework and add it again but it failed to. Still I don't have NSString header file.
try installing XCode again. Older SDK versions are no longer supported. Choose SDK 4.2 instead and compile it again. (I have copied the SDK 4.0 for backward compatibility but it is not shown in targets and project settings)
I had this problem in a project started in XCode 3 and now compiled in XCode 4, where the line
-#include <Foundation/NSString.h>
was flagged as no such file. I fixed it by re-adding the framework - although it was already appearing in my project (from when I had added it in XCode 3) using this approach:
How to "add existing frameworks" in Xcode 4?
I noticed the list seen by using this method did not include the Foundation framework.