TiddlyWiki / TiddlyWiki5

A self-contained JavaScript wiki for the browser, Node.js, AWS Lambda etc.
https://tiddlywiki.com/
Other
7.98k stars 1.18k forks source link

Browser warning and errors #4364

Open xmaysonnave opened 4 years ago

xmaysonnave commented 4 years ago

While displaying an embedded application/pdf attachment :

1 - Chrome 78 displays the whole content of the pdf in the dev console.

Here is the displayed warning. Resource interpreted as Document but transferred with MIME type application/pdf:

Load the Wiki @ https://bluelightav.eth.link Open de developer console Open [[The Embedded Little Prince Tiddler]]

2 - Firefox 68.2.0esr do not complain however the following error is displayed: _getLoginDataFromParent: A form origin is required

xmaysonnave/tiddlywiki-ipfs#3

Thanks

xmaysonnave commented 4 years ago

I made some further tests with the official TiddlyWiki @ https://tiddlywiki.com/. Drag and drop a pdf. Import the file Open the developer console Open the imported tiddler The console display the whole content. I made a comment on my GitHub for a possible solution: https://github.com/xmaysonnave/tiddlywiki-ipfs/issues/3#issuecomment-549007476 Thanks

Jermolene commented 4 years ago

Hi @xmaysonnave Chrome actually gives the same message if you just open one of the built-in PDFs:

https://tiddlywiki.com/#Motovun%20Jack.pdf

It turns out that this is a common problem with Chrome; try a Google query like this:

https://www.google.com/search?q=data+URI+%22Resource+interpreted+as+Document+but+transferred+with+MIME+type+application%2Fpdf%22

The only solution I found via my searches was using an "object" tag instead of "embed" but it didn't fix the problem.

xmaysonnave commented 4 years ago

Hi Jeremy, I also dig the issue this morning and realised it was the pdf extension from chrome who complains. I don't have the problem on chromium though. I try to dig the tiddlywiki source code to experiment but didn't figure out where it is managed (maybe you can tell me where to go ?) By the way you can call me Xavier. Thanks for your help.

On Sat, 2 Nov 2019, 17:23 Jeremy Ruston, notifications@github.com wrote:

Hi @xmaysonnave https://github.com/xmaysonnave Chrome actually gives the same message if you just open one of the built-in PDFs:

https://tiddlywiki.com/#Motovun%20Jack.pdf

It turns out that this is a common problem with Chrome; try a Google query like this:

https://www.google.com/search?q=data+URI+%22Resource+interpreted+as+Document+but+transferred+with+MIME+type+application%2Fpdf%22

The only solution I found via my searches was using an "object" tag instead of "embed" but it didn't fix the problem.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Jermolene/TiddlyWiki5/issues/4364?email_source=notifications&email_token=AE47PBGEO7HRC3MDIFYBZPLQRVS2JA5CNFSM4JHXPAXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC42GZY#issuecomment-549036903, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE47PBG2JWU65LPR4JAJOQDQRVS2JANCNFSM4JHXPAXA .

Jermolene commented 4 years ago

Thanks Xavier. The PDF embedding is done here

xmaysonnave commented 4 years ago

Hi Jeremy, First thank you to provide me the right direction. I confirm your previous tests.

Here are some tests and thoughts, I work on Debian Buster

chrome-embedded chromium-ipfs firefox-embedded

xmaysonnave commented 4 years ago

Opened a bug report @ Google : https://bugs.chromium.org/p/chromium/issues/detail?id=1030158

xmaysonnave commented 4 years ago

It seems that there is some improvement:

pmario commented 9 months ago

@xmaysonnave -- Is this still a problem? -- If not please close the issue.