Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Various il2cpp and mscorlib errors #47

Open
Caratroc opened this issue Mar 1, 2019 · 10 comments
Open

Various il2cpp and mscorlib errors #47

Caratroc opened this issue Mar 1, 2019 · 10 comments

Comments

@Caratroc
Copy link

Caratroc commented Mar 1, 2019

Hello,

I’m currently trying to build an empty unity project and a blank Ionic project on ios following your guide.
I have followed every step multiple times with different projects from scratch.
I am practically a beginner in all the ionic/web/html side for the record, so maybe i’m missing something obvious.
The ionic project works on its own when built and run from xcode or CLI.
The unity project works on its own as well.
After following the iOS steps, though, various errors start coming but seem all related to il2cpp and mscorlib.

Software used :
Unity 2017.4 and 2018.3
Ionic 4 and 3
Angular : Latest

extern "C" IL2CPP_METHOD_ATTR int32_t MonoCMethod_get_core_clr_security_level_m1431438660 (MonoCMethod_t3191134373 * __this, const RuntimeMethod* method)
{
	typedef int32_t (*MonoCMethod_get_core_clr_security_level_m1431438660_ftn) (MonoCMethod_t3191134373 *);
	using namespace il2cpp::icalls;
	return  ((MonoCMethod_get_core_clr_security_level_m1431438660_ftn)mscorlib::System::Reflection::MonoCMethod::get_core_clr_security_level) (__this);
}

mscorlib::System::Reflection::MonoCMethod::get_core_clr_security_level

No member named 'get_core_clr_security_level' in 'il2cpp::icalls::mscorlib::System::Reflection::MonoCMethod'

extern "C" IL2CPP_METHOD_ATTR void CustomAttributeData_ResolveArgumentsInternal_m4232068489 (RuntimeObject * __this /* static, unused */, ConstructorInfo_t5769829 * ___ctor0, Assembly_t * ___assembly1, intptr_t ___data2, uint32_t ___data_length3, ObjectU5BU5D_t2843939325** ___ctorArgs4, ObjectU5BU5D_t2843939325** ___namedArgs5, const RuntimeMethod* method)
{
	typedef void (*CustomAttributeData_ResolveArgumentsInternal_m4232068489_ftn) (ConstructorInfo_t5769829 *, Assembly_t *, intptr_t, uint32_t, ObjectU5BU5D_t2843939325**, ObjectU5BU5D_t2843939325**);
	using namespace il2cpp::icalls;
	 ((CustomAttributeData_ResolveArgumentsInternal_m4232068489_ftn)mscorlib::System::Reflection::CustomAttributeData::ResolveArgumentsInternal) (___ctor0, ___assembly1, ___data2, ___data_length3, ___ctorArgs4, ___namedArgs5);
}

mscorlib::System::Reflection::CustomAttributeData::ResolveArgumentsInternal

No member named 'CustomAttributeData' in namespace 'il2cpp::icalls::mscorlib::System::Reflection'; did you mean 'CustomAttributesCache'?
Replace 'mscorlib::System::Reflection::CustomAttributeData' with 'CustomAttributesCache'
No member named 'ResolveArgumentsInternal' in 'CustomAttributesCache'

and 6 other similar errors, not sure if it's useful to paste them.
screen shot 2019-03-01 at 13 54 37

If you have any question or suggestion I would be extremely thankful !

@yasirkula
Copy link
Owner

Does the same issue occur on a fresh new Unity project's build? Are you using some tool that obfuscates your code?

@Caratroc
Copy link
Author

Caratroc commented Mar 1, 2019

Yes same issue with a new project. I just put the IonicComms.cs in and uIonicComms.mm in the plugin/ios folder.
No obfuscating code. Thanks for the quick answer.

@yasirkula
Copy link
Owner

I can't think of any reasons for this behavior, sorry :/

@Caratroc
Copy link
Author

Caratroc commented Mar 4, 2019

Well, thanks a lot anyway. I will update when I solve this :)

@lfwells
Copy link

lfwells commented Mar 10, 2019

Any update on this? getting similar mscorlib compiler problems: [...]Classes/Native/Bulk_mscorlib_15.cpp:18759:114: No member named 'EncodingHelper' in namespace 'il2cpp::icalls::mscorlib::System::Text' and a bunch more too.

Building with Unity 2018.3.5f1

I will also update if I find anything new.

@lfwells
Copy link

lfwells commented Mar 10, 2019

Curiously, the class members it is looking for in my error message there do exist inside Unity/Libraries/libil2cpp/include/icalls/mscorlib/... However they're wrapped up in #if NET_4_0, so they're not found.

Still poking around trying to get it to compile (I'm out of my depth here), but the members are clearly found if NET_4_0 is defined as true, and the compiler error goes away.

Not sure where the root cause is yet though, surely NET_4_0 should be defined somewhere?

@lfwells
Copy link

lfwells commented Mar 10, 2019

I added NET_4_0 as a preprocessor Macro under target build settings. I've gotten it to compile now (I think I had some other problems unrelated (?) to this one. Unfortunately get a crash when trying to launch unity now, but honestly not surprised given how much I've hacked at this. Will report back if I learn anything.

@yasirkula
Copy link
Owner

You may try changing Scripting Runtime Version and/or Api Compatibility Level in Player Settings.

@lfwells
Copy link

lfwells commented Mar 10, 2019

I believe I was compiling with Net 4 for all of this, but I still had to add the NET_4_0 preprocessor directive manually in Xcode. No idea why :) I got rid of my crashing using the advice in this thread: https://forum.unity.com/threads/il2cpp-anyone-else-seeing-metadatacache-initialize-crashes-sometimes-when-the-game-starts.383145/page-2 Again, unsure if related to this issue or if I was just getting multiple issues at once here.

@zoix
Copy link

zoix commented Aug 19, 2019

@lfwells - you posted this so long time ago and the same is happening to me now. I solved everything except the crash. Not sure which was the advice you followed (there are a couple, both did not work for me) and how you finally solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants