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

Extension causes JSON parse error when loading SharePoint page #210

Open
jrossstocholm opened this issue Jan 2, 2024 · 19 comments
Open

Comments

@jrossstocholm
Copy link

jrossstocholm commented Jan 2, 2024

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 jrossstocholm changed the title Extension causes JSON parseerror when loading SharePoint page Extension causes JSON parse error when loading SharePoint page Jan 2, 2024
@stanio
Copy link
Contributor

stanio commented Jan 2, 2024

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.

@jrossstocholm
Copy link
Author

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
Copy link
Author

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.

@bhollis
Copy link
Owner

bhollis commented Jan 2, 2024

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.

@subbink
Copy link

subbink commented Jan 3, 2024

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

@Oneill701
Copy link

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

@bhollis
Copy link
Owner

bhollis commented Jan 10, 2024

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

@qmacro
Copy link

qmacro commented Feb 3, 2024

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

@calvinhsia
Copy link

calvinhsia commented Mar 12, 2024

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);

@bhollis
Copy link
Owner

bhollis commented Jun 18, 2024

Is this still happening on the 3.0.0 version of JSONView?

@subbink
Copy link

subbink commented Jun 19, 2024

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

@DidierLoiseau
Copy link

I just checked and it seems ok now for me.

@bhollis
Copy link
Owner

bhollis commented Jun 19, 2024

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

@bhollis bhollis closed this as completed Jun 19, 2024
@subbink
Copy link

subbink commented Jul 3, 2024

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

@bhollis
Copy link
Owner

bhollis commented Jul 10, 2024

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

@subbink
Copy link

subbink commented Jul 12, 2024

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.

@bhollis
Copy link
Owner

bhollis commented Jul 13, 2024

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

@bhollis bhollis reopened this Jul 13, 2024
@hylkevds
Copy link

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

@hylkevds
Copy link

As an intermediate solution, would it be possible to add a quickly accessible toggle to turn jsonview on and off? Right now it takes several clicks to turn it off, and a few more clicks to turn it back on.

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

9 participants