swagger-viewer
swagger-viewer copied to clipboard
Cause error
I am trying to display swagger by extension in yml on github, and now I get the following error message.
How can I configure it to fix the problem?
Error: Unexpected DOM. Probably GitHub has been updated. Please contact the developer or wait until the extension is fixed. selector1: "#repo-content-turbo-frame div.Box-body table", selector2: "#repo-content-pjax-container div.Box-body table"
Reproduce
- Install this app.
- Open swagger page in GitHub.
- Click this app icon.
same error
@nekowasabi, @Tolluset Sorry for the late reply and Thank you for your report! But I can not reproduce the problem now. I have tried all the files listed below.
- https://github.com/OAI/OpenAPI-Specification/tree/main/examples/v2.0
- https://github.com/OAI/OpenAPI-Specification/tree/main/examples/v3.0
If you don't mind, could you please elaborate on your situation? For example, the DOM displayed on GitHub seems to change because of the following:
- Logged in or not
- Belonging to a GitHub organization or not
- Occasional AB test
I have written tests for every DOM I know of, but it is not enough...
What I want to know 🙏
- Are you logged in to GitHub? (Yes/No)
- Does your account belong to a GitHub organization? (Yes/No)
- Are you using Chrome's secret mode? (Yes/No)
It would be helpful to know if there are other situations of concern.
@arx-8
Are you logged in to GitHub? (Yes/No)
- yes
Does your account belong to a GitHub organization? (Yes/No)
- yes
Are you using Chrome's secret mode? (Yes/No)
- no
I am using refined-gihutb extension (https://github.com/refined-github/refined-github), can this cause problem?
Same issue:
Error: Unexpected DOM. Probably GitHub has been updated. Please contact the developer or wait until the extension is fixed. selector1: "#repo-content-turbo-frame div.Box-body table", selector2: "#repo-content-pjax-container div.Box-body table"
at Em (content_scripts.ts.3ce163c6.js:71:1677)
at E7e (content_scripts.ts.3ce163c6.js:228:207)
at x7e (content_scripts.ts.3ce163c6.js:228:139)
at content_scripts.ts.3ce163c6.js:225:151
@arx-8
Are you logged in to GitHub? (Yes/No)
- Fails when I am logged in
- Works when I am signed out!
Does your account belong to a GitHub organization? (Yes/No)
- No, but I do have an org account. It also fails with same error.
Are you using Chrome's secret mode? (Yes/No)
- No
Using latest Edge. Ad Blocker disabled.
Update:
- I opened petstore-expanded.json to Incognito mode, clicked the extension, and nothing happened.
- I did a hard refresh (ctrl+F5), clicked the extension, and it worked! Now it works all the time in Incognito mode... as long as I am signed out.
When logged out, the content selector is #repo-content-pjax-container > div > div > div.Box.mt-3.position-relative > div.Box-body.p-0.blob-wrapper.data.type-oasv3-json.gist-border-0 > div > table
When logged in, the equivalent content selector is #repo-content-pjax-container > react-app > div > div > div.Box-sc-1gh2r6s-0 > div.Box-sc-1gh2r6s-0.eIXfXs > div > div > main > div.Box-sc-1gh2r6s-0.pBRZy > div > div.Box-sc-1gh2r6s-0.bsCgnj > div.Box-sc-1gh2r6s-0.bUAlhA > div > div.Box-sc-1gh2r6s-0.dwgsHB > section > div. Here is a screenshot:
