tableau / extensions-api

Extensions API sample code and developer docs.
http://tableau.github.io/extensions-api
MIT License
268 stars 251 forks source link

Unhandled promise rejection This extension is not running inside an iframe, desktop, or popup window. Initialization failed. #210

Closed nguyenmanhha87 closed 2 years ago

nguyenmanhha87 commented 5 years ago

I ihave nstalled tableau extension but it's not work. I check console of chrome. "Unhandled promise rejection This extension is not running inside an iframe, desktop, or popup window. Initialization failed."

open http://localhost:8765/Samples/DataSources/datasources.html => All DataSources > Loading...

Can you help me to fix it ?

Thank you.

johnDance commented 5 years ago

Hello: What browser are you running in? What version of tableau server are you using? (I'm assuming you are running server and not desktop.) Have you modified the datasources sample at all? John

nguyenmanhha87 commented 5 years ago

thanks johnDance,

I use the latest Chrome. and tableau desktop 2018.2.

i use latest nodejs

i haven’t modified the datasources sample.

Could you help me to check log to fix?

Thanks you

johnDance commented 5 years ago

Hello You have your local server up and running, so that is good. However, to use an extension, you need to create a Tableau dashboard, and then drag the extension icon to choose an extension. Then you select the .trex file. At that point, your data sources sample will be running in the Tableau dashboard, and will function properly. This web page has a good explanation on adding the extension with an animated example: https://tableau.github.io/extensions-api/docs/trex_getstarted.html#start-tableau-and-add-an-extension-to-the-dashboard.

John

LGraber commented 5 years ago

As John points out, it sounds like what you were trying to do was simply load your extension inside of a browser. That won't work and you will get the exact error you were seeing. let us know if that is what you were doing and if you are now able to use the extension within Tableau (desktop / server). Thanks! I will also look at putting up something in our docs with this error string so people can find it faster.

RaghunathVadlakonda commented 2 years ago

I'm also facing the same issue I'm using tableau desktop, I'm new to Tableau work. May I know what exactly this issue is Screenshot 2021-11-08 at 8 49 13 PM Screenshot 2021-11-08 at 8 49 31 PM ?

johnDance commented 2 years ago

Hi @RaghunathVadlakonda How are you using your extension in your Tableau dashboard? Make sure to drag (or double click) the extension icon in the dashboard objects panel. That will create a new dashboard object that will hold your extension, and will also open up a dialog for you to choose your extension.

If that doesn't work, would it be possible to share a small workbook where you are seeing this problem?

Thanks, John

(I've highlighted the extension object in the screen capture below.)

image

RaghunathVadlakonda commented 2 years ago

Hi @johnDance

Yes(I used drag), Same I used the extension how you mentioned above.

I'm using Macbook Air - 11.6 version I tried with 2021.2 and 2020.2 Tableau Desktop versions and Extension version - 1.7.0

Actually, I'm using javascript to create a custom extension and integrate it into Tableau Desktop but When I'm trying to drag extension in the tableau dashboard I'm getting this issue in my chrome browser console Screenshot 2021-11-08 at 8 49 13 PM .

johnDance commented 2 years ago

Hi @RaghunathVadlakonda Have you verified that your first extension call is initializeAsync? That needs to happen after the document has loaded. If you don't call initializeAsync, or if initializeAsync is called before the document has been loaded, the next calls will fail. John