graphgist icon indicating copy to clipboard operation
graphgist copied to clipboard

Fails to render graph gist

Open bplies-ATX opened this issue 8 years ago • 1 comments

Using neo4j 3.1.0, running on local port 7474 (modified graphgist.js) uncommented console.log in console.js

            window.setTimeout(function () {
                try {
                    if (iframeWindow.location && iframeWindow.location.href) {
                        var consoleLocation = iframeWindow.location.href;
                        if (consoleLocation.indexOf('neo4j') === -1 && consoleLocation.indexOf('localhost') === -1) {
                            $iframe.replaceWith('<div class="alert alert-error"><h4>Error!</h4>The console can not be loaded. Please turn off ad blockers and reload the page!</div>');
                        }
                    }
                } catch (err) {
                    // for debugging only
                    console.log(err)
                }
            }, 2000);
        });

See javascript console log of

DOMException: Blocked a frame with origin "http://localhost:8000" from accessing a cross-origin frame. at http://localhost:8000/js/console.js:71:71

Done what I can to make sure there's no CORS interference on the HTTP hosting the gist as well as Neo4j. Chrome appears to have a known issue with CORS and localhosts. Firefox has a different error.

bplies-ATX avatar Feb 10 '17 22:02 bplies-ATX

I'm not sure what you're saying, did it fail after your change or does your change fix it?

On Fri, Feb 10, 2017 at 11:01 PM, bplies-IAS [email protected] wrote:

Using neo4j 3.1.0, uncommented console.log in console.js

        window.setTimeout(function () {
            try {
                if (iframeWindow.location && iframeWindow.location.href) {
                    var consoleLocation = iframeWindow.location.href;
                    if (consoleLocation.indexOf('neo4j') === -1 && consoleLocation.indexOf('localhost') === -1) {
                        $iframe.replaceWith('<div class="alert alert-error"><h4>Error!</h4>The console can not be loaded. Please turn off ad blockers and reload the page!</div>');
                    }
                }
            } catch (err) {
                // for debugging only
                console.log(err)
            }
        }, 2000);
    });

See javascript console log of

DOMException: Blocked a frame with origin "http://localhost:8000" from accessing a cross-origin frame. at http://localhost:8000/js/console.js:71:71

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/neo4j-contrib/graphgist/issues/40, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEHY2oZIc6n3ZvkAur7z3TLv2iN6SNmks5rbN5HgaJpZM4L95vd .

jexp avatar Feb 11 '17 14:02 jexp