Hi again. I still don’t know what could cause this error message.
So, the question is not what is causing it in this specific case (i.e. in my code), I would be more than happy with only some kind of explanation of what things generally cause this error message.
I think it could be quite helpful with that help only; i.e. to get an explanation of what kind of troubles you see could cause the error message. From there I can analyze my program to see if any such condition seem to be met. I might be able to identify the problem based on your description of how you have previously seen it occur.
If you think there are too many possible conditions, and want it more narrowed down to say anything, I have set up a small project (VS2017) which uses only the minimum necessary code to reproduce the error, it can be found here: https://github.com/oetyng/SAFE.BugRepro
You can see that I already generated the encodedUrl, so it is to be pasted into the string on line 19 in class ReproErrorTest. Yes, this will log you in to my account on the live alpha 2 network, I figured I would try make it as easy as possible to help me here. So, this is the string:
EncodedUrl
“AQAAADfahxkAAAAAAAAAACAAAAAAAAAAW3qelLW7jFXrNAr0DXhX7tn1iyPTOP3IllSZ0bGoiCwgAAAAAAAAABr-w3LPHUJh-aMeG16_j3-npbYxfhEdJsGHbDVrx1lZIAAAAAAAAABeKzN0xGKbT0fkYQlGlR6Lh9D7X30KXPkCY2D5eq0khkAAAAAAAAAANP9JC_ew-Be2bZYXa9UrvedqUV8y7R1KmU3gAdWs3EpeKzN0xGKbT0fkYQlGlR6Lh9D7X30KXPkCY2D5eq0khiAAAAAAAAAA4saAb_a4Z3Q2w_P2j7NvD-5PTOR5j8Yr-c8rc7g_eBcgAAAAAAAAAHv0e1hr99WvUPc9S9dGTaDT0PO7Du2DJRlSmKk00aZJGQAAAAAAAAAQAAAAAAAAADE3OC42Mi43Ni44OjU0ODMTAAAAAAAAADEzOC42OC4xODUuMjE4OjU0ODMSAAAAAAAAADEzOC42OC4xODEuNTc6NTQ4MxIAAAAAAAAAMTM4LjY4LjE4MS42MDo1NDgzEgAAAAAAAAAxMzguNjguMTgxLjg2OjU0ODMSAAAAAAAAADEzOC42OC4xODEuODc6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4xNjg6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4xNzY6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4xNzk6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4xODA6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4xODI6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4yNDI6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4yNDM6NTQ4MxMAAAAAAAAAMTM4LjY4LjE4MS4yNDk6NTQ4MxIAAAAAAAAAMTM4LjY4LjE4OS4xNDo1NDgzEgAAAAAAAAAxMzguNjguMTg5LjE1OjU0ODMSAAAAAAAAADEzOC42OC4xODkuMTc6NTQ4MxIAAAAAAAAAMTM4LjY4LjE4OS4xODo1NDgzEgAAAAAAAAAxMzguNjguMTg5LjE5OjU0ODMSAAAAAAAAADEzOC42OC4xODkuMzE6NTQ4MxIAAAAAAAAAMTM4LjY4LjE4OS4zNDo1NDgzEgAAAAAAAAAxMzguNjguMTg5LjM2OjU0ODMSAAAAAAAAADEzOC42OC4xODkuMzg6NTQ4MxIAAAAAAAAAMTM4LjY4LjE4OS4zOTo1NDgzEQAAAAAAAAA0Ni4xMDEuNS4xNzk6NTQ4MwFrFQAAAAAAAQcAAAAAAAAAYWxwaGFfMgAtTe4p_vs9mI0Mz3uHzyVp_R7x2qwF2lONrv8o2Y8x1Jg6AAAAAAAAGAAAAAAAAADz9dMQPuvfZPYQSdzriLrFbpnUTgJxzUs=”
So, you can just debug the method TestPermissionSet in class ReproErrorTest.cs, and step right through to line 42 in TestClass.cs. That is all that is necessary to see it in action.
Also provided, some of the points from this post: https://dev.autonomi.community/t/in-need-of-support-please-follow-these-guidelines/1271:
Basic info as per the support questions template
- What application or program are you running?
SAFE.EventStore (or for your convenience SAFE.BugRepro), based on SafeMessages
It uses https://github.com/oetyng/safe_dotnet (included in SAFE.BugRepro) which is a .NET wrapper around the FFI libraries that I wrote.
I compiled safe_app and system_uri from alpha_2 branch.
SafeBrowser v0.6.0 for authorising app and getting encoded url.
- What’s the version number?
N/A
- What are the version numbers of the supporting dependencies that you are using locally? For example, Node.js, NPM, and Rust.
VS2017 Community
- Which operating system are you using and which version number?
Windows 10 Education in a Hyper-V VM (Microsoft Windows NT 6.2.9200.0)
- What steps did you follow when the error occurred and how can we reproduce it?
Basically I am running the same base code as SafeMessages, albeit extracted out and placed within another app.
The test project SAFE.BugRepro has extracted out what happens in the original project SAFE.EventStore.
I register the uri with SystemUri which I compiled from alpha_2 branch. Then I get an EncodedUrl from SafeBrowser (which is sent as argument to the application on the path I specified in AppInfo Exec property when installing the Uri).
There, the EncodedUrl is passed to HandleUrlActivationAsync
of AppSession.cs, (it is the same code as in SafeMessages).
From there AppRegisteredAsync
is called in class Session.cs, (containing exactly the same code as in SafeMessages).
There it calls
NativeBindings.AppRegistered(appId, authGrantedFfiPtr, NetObs, callback);
(which is also the exact same code, copied).
After this, I try to do the very first operation, which is to do the equivalent of what is done here:
https://github.com/maidsafe/safe_mobile/blob/86e9c17bceffaea014ff7b5e222a59e364860c1f/SafeMessages/SafeMessages/Services/AppService.cs#L100
This is done on line 42 in TestClass.cs, here:
https://github.com/oetyng/SAFE.BugRepro/blob/5ac59a2e4a04a2c3a9ce67d4e3409f5596667e5e/SAFE.BugRepro/TestClass.cs#L42
And this is where the problem occurs (as per OP).
Q: Could someone please provide me with any information on what might be going wrong here?
Specifically, under what circumstances can this error "Invalid MutableData permission set handle"
occur?
Or please let me know what more info I can give you so that you can help me out.