germanattanasio / visual-recognition-nodejs

DEPRECATED: this repo is no longer actively maintained
Apache License 2.0
361 stars 351 forks source link

Getting error when trying to access JSON result #261

Closed arlemi closed 6 years ago

arlemi commented 7 years ago

When clicking on the JSON button to see the raw json that is returned by the service, it opens a blank page and doesn't show anything.

When opening the browser console, I'm seeing the following error message:

https://visual-recognition-demo.mybluemix.net/js/bundle.js:543 Not allowed to navigate top frame to data URL: data:application/json,%7B%0A%20%22classes%22%3A%20%5B%0A%20%20%7B%0A%20%20%20%22class%22%3A%20%22chocolate%20chip%20pancakes%22%2C%0A%20%20%20%22score%22%3A%201%2C%0A%20%20%20%22type_hierarchy%22%3A%20%22%2Fsweet%20treat%2Fsweet%20cooked%20dough%2Fsweet%20pancakes%2Fchocolate%20chip%20pancakes%22%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%22class%22%3A%20%22sweet%20pancakes%22%2C%0A%20%20%20%22score%22%3A%201%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%22class%22%3A%20%22sweet%20cooked%20dough%22%2C%0A%20%20%20%22s...A%201%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%22class%22%3A%20%22sweet%20treat%22%2C%0A%20%20%20%22score%22%3A%201%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%22class%22%3A%20%22baked%20Alaska%22%2C%0A%20%20%20%22score%22%3A%200.5%2C%0A%20%20%20%22type_hierarchy%22%3A%20%22%2Fdessert%2Fbaked%20Alaska%22%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%22class%22%3A%20%22dessert%22%2C%0A%20%20%20%22score%22%3A%200.503%0A%20%20%7D%0A%20%5D%2C%0A%20%22classifier_id%22%3A%20%22food%22%2C%0A%20%22name%22%3A%20%22food%22%0A%7D value @ https://visual-recognition-demo.mybluemix.net/js/bundle.js:543

I'm running Chrome Version 61.0.3163.100 (Official Build) (64-bit)

germanattanasio commented 7 years ago

@KSlachta ☝️

ghost commented 7 years ago

It seems that however it is handled for the demo does not work with the latest version of chrome

arlemi commented 7 years ago

I've demoed Watson VR a few times and wanted to show the raw JSON, landing on a blank page is not a good experience. As the JSON is already loaded on the page can it be shown on an overlay for example? Rather than opening a new page.

germanattanasio commented 7 years ago

We have a JSON component that can be used for this. https://watson-developer-cloud.github.io/react-components/#JsonLinkInlineExamples

arlemi commented 7 years ago

I tried to change it but watson-react-component is not in this project, though I'm seeing some elements like JsonLink that have been added one-by-one. Importing the lib with the css breaks the UI so I'll leave it to someone who knows the project to fix it.

germanattanasio commented 7 years ago

:thinking:

germanattanasio commented 7 years ago

Thanks for trying @arlemi, I think the dev is on vacation now.

VanceVu commented 7 years ago

The JSON button no longer works in Chrome because it no longer allows data URLs in the top frame as of update 60. Look here for more information.

The JsonLink component in the watson-react-components package is probably broken on Chrome as well since it's using the same method to display the JSON window.

ghost commented 6 years ago

Fixed