Marcelh1983 / document-viewer

MIT License
50 stars 25 forks source link

Pop-out is not loading the document in another tab. #20

Closed rvmore closed 3 years ago

rvmore commented 3 years ago

Hi,

Thanks for the nice library.

I am struggling with the pop-out feature, when clicking on pop-out icon it opens the new tab but no file is getting opened & the page title is displayed as "undefined".

But when I am doing reload to same page it's actually loading all the contents & having below error in the console.

It would be great if you can help me for this.

m=main:55 Uncaught GZ {message: "Did not receive drive#about kind when fetching import map:undefined", stack: "CustomError: Did not receive drive#about kind when…AC2dHMIzHFdmk9QxJ-IhWCmkUp3RltSU3A/m=main:98:264)"} (anonymous) @ m=main:55 setTimeout (async) Ca @ m=main:55 (anonymous) @ m=main:106 Oc @ m=main:98 Promise.then (async) Kc @ m=main:98 Nc @ m=main:98 $c @ m=main:105 Qc @ m=main:104 Rc.SL @ m=main:103 k @ m=main:104 e.$n @ cb=gapi.loaded_0?le=ili,ipu:230 Ok @ cb=gapi.loaded_0?le=ili,ipu:233 Jk @ cb=gapi.loaded0?le=ili,ipu:233 .uk.Mt @ cb=gapi.loaded_0?le=ili,ipu:232 sk @ cb=gapi.loaded_0?le=ili,ipu:225 Promise.then (async) nk @ cb=gapi.loaded0?le=ili,ipu:225 .rk @ cb=gapi.loaded_0?le=ili,ipu:225 Kk @ cb=gapi.loaded_0?le=ili,ipu:232 tk @ cb=gapi.loaded_0?le=ili,ipu:231 (anonymous) @ cb=gapi.loaded_0?le=ili,ipu:226 d @ cb=gapi.loaded_0?le=ili,ipu:984 (anonymous) @ cb=gapi.loaded_0?le=ili,ipu:983 (anonymous) @ cb=gapi.loaded_0?le=ili,ipu:854 u.__cb @ cb=gapi.loaded_0?le=ili,ipu:341 d @ cb=gapi.loaded_0?le=ili,ipu:335 b @ cb=gapi.loaded_0?le=ili,ipu:330 m=main:55 Uncaught {result: {…}, body: "{\n \"error\": {\n \"errors\": [\n {\n \"domain\": \"gl… \"code\": 401,\n \"message\": \"Login Required\"\n }\n}\n", headers: {…}, status: 401, statusText: null}

Marcelh1983 commented 3 years ago

Hi @rvmore, this packages is just a wrapper for in your case the google viewer in an iframe. So it's probable something in the google viewer that causes the problem.

rvmore commented 3 years ago

Thanks @Marcelh1983 for your quick reply. Is there any way to hide this "Pop out" button completely?

Marcelh1983 commented 3 years ago

@rvmore, no that is no possible. It's rendered by the google vier in the iframe. I tried some things to add an overlay to the buttons but I regret adding this functionality because it's more of a hack that works as long as google keeps placing the button at that excat position.