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

XSON fails to apply a JSON Patch when run using a Host rewriting proxy #464

Closed
1 of 6 tasks
warpech opened this issue Apr 25, 2019 · 2 comments
Closed
1 of 6 tasks
Assignees

Comments

@warpech
Copy link

warpech commented Apr 25, 2019

Starcounter version: <2.4.20564.mapping>.

Issue type

  • Bug
  • Feature request
  • Suggestion
  • Question
  • Cannot reproduce
  • Urgent

Issue description

I am using Ngrok to access my Starcounter app (HeadsOmni) using HTTPS. The app expects the hostname to be backoffice.omni.local, so Ngrok is configured to rewrite the Host header to match.

When I access the app using a URI provided by Ngrok (e.q. https://21d03b75.ngrok.io/BlendingEditor) the app renders the login screen OK. However, trying to use the login screen, an exception occurs.

It might be complex to isolate the problem in the complete HeadsOmni project, so I will try to find a simpler isolation of it in a smaller app.

Exception stack trace

"Starcounter.XSON.JsonPatch.JsonPatchException: Unknown namespace in path. Patch: '{""op"":""replace"",""path"":""/_ver#c$"",""value"":2}'. Property: '_ver#c$'. Viewmodel versions: {client (_ver#c$): 1, clients serverversion: 0, server (_ver#s): 0}.
   at Starcounter.XSON.JsonPatch.JsonProperty.EvalutateCurrent(ViewModelVersion version)
   at Starcounter.XSON.Internal.XSONInternals.RunWithinApplication(String appName, Action action)
   at Starcounter.XSON.JsonPatch.JsonProperty.DoEvaluate(Json root)
   at Starcounter.XSON.JsonPatch.JsonProperty.Evaluate(JsonPointer pointer, Json root)
   at Starcounter.XSON.JsonPatch.DefaultPatchHandler.Handle(Json root, JsonPatchOperation patchOp, JsonPointer pointer, String value)
   at Starcounter.XSON.JsonPatch.JsonPatch.HandleOnePatch(Json root, JsonPatchOperation op, JsonPointer ptr, String value, Int32 patchCount, ChangeLog changeLog, Object sourceJson, Boolean strictRejection, JsonPatchStatus previousStatus)
   at Starcounter.XSON.JsonPatch.JsonPatch.Apply(Json root, JsonTextReader reader, Boolean strictPatchRejection, Object sourceJson, Int32& patchCount)
   at Starcounter.XSON.JsonPatch.JsonPatch.Apply(Json root, String patch, Boolean strictPatchRejection, Int32& patchCount)
   at Starcounter.Internal.PuppetRestHandler.<>c.<RegisterJsonPatchHandlers>b__10_2(Request request, Session session) in C:\	c_work\ScMappingNightlyRel-20564\level1\src\Starcounter.Apps.JsonPatch\BuiltInRestHandlers\PuppetRestHandler.cs:line 205
   at lambda_method(Closure , Request , IntPtr , IntPtr )
   at Starcounter.Rest.UserHandlerInfo.RunUserDelegate(Request req, IntPtr methodSpaceUriSpaceOnStack, IntPtr parametersInfoOnStack) in C:\	c_work\ScMappingNightlyRel-20564\level1\src\Starcounter.Rest\UriHandlersManager.cs:line 231
   at Starcounter.Internal.Web.AppRestServer.RunDelegateAndProcessResponse(IntPtr methodSpaceUriSpaceOnStack, IntPtr parametersInfoOnStack, Request req) in C:\	c_work\ScMappingNightlyRel-20564\level1\src\Starcounter.Apps.JsonPatch\AppRestServer.cs:line 89
   at Starcounter.Internal.AppsBootstrapper.ProcessExternalRequest(Request req) in C:\	c_work\ScMappingNightlyRel-20564\level1\src\Starcounter.Apps.JsonPatch\AppsBootstrapper.cs:line 552
Patch={""op"":""replace"",""path"":""/_ver#c$"",""value"":2}
CurrentProperty=_ver#c$
Severity=1
HResult=-2146233088
"
@warpech
Copy link
Author

warpech commented Apr 25, 2019

I am getting different errors, but still errors, when trying to use:

  • UniformDocs with Ngrok
  • HeadsOmni with Serveo (Ngrok alternative), ssh -R 80:backoffice.omni.local:8080 serveo.net

I will continue this investigation in May

@warpech warpech self-assigned this Apr 25, 2019
@miyconst miyconst assigned erikvk and unassigned warpech May 31, 2019
@miyconst
Copy link
Member

miyconst commented Jan 7, 2020

Archiving.

@miyconst miyconst closed this as completed Jan 7, 2020
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

3 participants