jsonview icon indicating copy to clipboard operation
jsonview copied to clipboard

Extension causes JSON parse error when loading SharePoint page

Open jrossstocholm opened this issue 1 year ago • 19 comments
trafficstars

Describe the bug When I have the extension enabled I cannot load our internal SharePoint intranet. When I disable the extension, the page loads fine but after enabling it (repeatedly) the load of the page fails.

I have used the extension for about 6 months, and I have not seen this error before. Maybe it was caused by the December 17th update.

The error is

"There was an error parsing the JSON document. The document may not be well-formed."

What browser are you using?* I am using Edge on Windows

Where did you install JSONView from? I have installed it through Microsoft extension Store.

image

jrossstocholm avatar Jan 02 '24 08:01 jrossstocholm

I was experiencing this intermittently in the past and I've identified the cause was not JSONView alone. After disabling all but the JSONView extension the problem was not occurring for me. I've reenabled other extensions one at a time and ultimately identified another extension (don't remember which one) that was causing the problem. In my case, I've dropped the usage of that other extension.

stanio avatar Jan 02 '24 09:01 stanio

I was experiencing this intermittently in the past and I've identified the cause was not JSONView alone. After disabling all but the JSONView extension the problem was not occurring for me. I've reenabled other extensions one at a time and ultimately identified another extension (don't remember which one) that was causing the problem. In my case, I've dropped the usage of that other extension.

Since I am on a company-controlled version of Edge, I do not have full control over the extensions. My current extensions are these

image

If I re-enable JSONVIEW it breaks - if I disable it, it works fine. I cannot disable the "iswebhook" extension, so I cannot for sure say that it is not a combination of these two. I can say, however, that I noticed the new behaviour around Christmas - so it sort of fits with the new update of the extension.

I will look into having the "iswebhook" extension disabled to trouble-shoot further 😊

jrossstocholm avatar Jan 02 '24 13:01 jrossstocholm

I was just told that the "iswebhook" extension (Lakeside Systrack Agent) was installed on our PCs in March 2023, so this extension and JSONview has been living nicely side by side for almost 9 months.

I will continue to investigate if I can disable it to confirm the root cause of SharePoint load issues.

jrossstocholm avatar Jan 02 '24 14:01 jrossstocholm

It seems likely that removing the webRequestBlocking permission is the culprit - it works for directly viewing JSON but SharePoint must be doing something weird. Unfortunately if that's the case JSONView will cease to be after the ManifestV3 transition.

bhollis avatar Jan 02 '24 17:01 bhollis

I can confirm the issue as well when using firefox 120.0.1 on linux.

subbink avatar Jan 03 '24 10:01 subbink

Hello,

I have the same error in Edge when I open a SharePoint site. If I deactivate this extension it works again. I think it's link to the last version of Edge. I have problem too when I open a public link : https://cdn.ruckzuck.tools/rest/v2/getsoftwares?apikey=45820419983905&shortname=Google%20Chrome It's now correctly format in Edge with the extension deactivate. So I think Edge directly integrate a JSON formater.

Other link for test : https://microsoftedge.github.io/Demos/json-dummy-data/256KB-min.json

Oneill701 avatar Jan 10 '24 10:01 Oneill701

I've submitted a new version of JSONView, I don't know when it'll be approved.

bhollis avatar Jan 10 '24 17:01 bhollis

SharePoint must be doing something weird

I would say so - I experience this issue too with Sharepoint sites, and noticed that Sharepoint returns content type application/json for main (web) page requests. Sharing this here just in case it helps.

Screenshot 2024-02-03 at 15 41 57

qmacro avatar Feb 03 '24 15:02 qmacro

I get the same error:

MSEdge (Version 122.0.2365.80 (Official build) (64-bit)) returns: "There was an error parsing the JSON document. The document may not be well-formed." However, there is no error, as the developer tools shows. Works fine in FireFox browser and Postman. Fiddler shows JSON is fine. Sometimes works in Edge InPrivate view. Disable JSONVIEW and everything works.

Simple repro in Azure Function that returns raw JSON.

    [Function(nameof(UploadBinary))]
    public async Task<IActionResult> UploadBinary([HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", "patch")] HttpRequest req)
    {
        var mynewobj = new
        {
            Name = "foobar",
            City = "redmond"
        };
        return new JsonResult(mynewobj);

calvinhsia avatar Mar 12 '24 18:03 calvinhsia

Is this still happening on the 3.0.0 version of JSONView?

bhollis avatar Jun 18 '24 17:06 bhollis

I'll have a look when 3.0.0 is available from the firefox add-ons site.

subbink avatar Jun 19 '24 04:06 subbink

I just checked and it seems ok now for me.

DidierLoiseau avatar Jun 19 '24 12:06 DidierLoiseau

Cool, feel free to reopen if this re-occurs.

bhollis avatar Jun 19 '24 18:06 bhollis

When using version 3.0.1, I still get an error.

There was an error parsing the JSON document. The document may not be well-formed.
unexpected character at line 1 column 1
Skip to main content
Home
Currently following the site, click to stop following

subbink avatar Jul 03 '24 06:07 subbink

That's unfortunate. Can you provide me with a Sharepoint site I can access to test with?

bhollis avatar Jul 10 '24 17:07 bhollis

That's unfortunate. Can you provide me with a Sharepoint site I can access to test with?

No, sorry. It is the company's sharepoint and I'm only a user.

subbink avatar Jul 12 '24 03:07 subbink

OK well I'll reopen it but I can't do anything until I can see a site like this.

bhollis avatar Jul 13 '24 01:07 bhollis

You could try this sharepoint site: https://fraunhofer.sharepoint.com/ I'm on Firefox 128.0 and also have the same issue.

hylkevds avatar Jul 17 '24 10:07 hylkevds