clem
(Clem)
January 19, 2021, 2:24am
1
I'm going through the materials here:
https://neo4j.com/graphacademy/training-applied-algos/01-setup-and-cypher-refresher/
which refers to the step-by-step instructions here:
https://guides.neo4j.com/applied_graph_algorithms/02_category_hierarchy.html
It appears that the function algo.similarity.overlap()
has already been run on the Yelp DB. I see there are already relationships [:NARROWER_THAN]
prior to me running the function on the sandbox (as part of the exercise.)
Also...
The sandbox is running version Neo4J 3.5.17 which doesn't seem to be mentioned.
This is important as the new version seems to have a different function call:
CALL algo.similarity.overlap()
// takes a write parameter
vs.
CALL gds.alpha.similarity.overlap()
// actually, a separate write function
https://neo4j.com/docs/graph-data-science/1.5-preview/alpha-algorithms/overlap/
Also...
It appears that this has also been run on the YELP DB that's gets loaded into the SandBox.
MATCH (g1:Category)-[:NARROWER_THAN*2..]->(g3:Category),
(g1)-[d:NARROWER_THAN]->(g3)
DELETE d
The Browser reports that no changes were made.
Also... Running the last query before running the other overlap queries returns nodes, which definitely means the Yelp DB already has the overlap relationships precreated:
MATCH path = (category:Category)-[:NARROWER_THAN*]->(superCategory:Category)
RETURN path
LIMIT 10
You are correct, the old version of the course using Neo4j 3.5 sandbox and the deprecated Graph Algorithms library has the NARROWER_THAN relationships already loaded in the database, which is a mistake on our end. Thanks for letting us know! We will fix it. In the meantime, you will have to manually delete the relationships before starting the course with the following Cypher statement:
MATCH ()-[r:NARROWER_THAN]->()
DELETE r
There is an updated version of the course using Neo4j 4.x and GDS library, which you can find at: https://neo4j.com/graphacademy/training-gdsaa-40/enrollment/
This version does not run on Sandbox as there are currently no Neo4j 4.0 Sandboxes available. You will have to run the database locally and load the dump file. We are working on bringing Neo4j 4.x Sandboxes that can be used to run the GDS library, so expect an update to the new course.
Thanks for your feedback.
clem
(Clem)
January 23, 2021, 10:07pm
3
Please add a pointer to the course that uses the new version of Neo4J. I got to it from a Google search, which sometimes favors older links over newer, better ones.
Thanks!
clem
(Clem)
January 26, 2021, 3:44am
4
Also...
When I go to this page:
I get to:
https://neo4j.com/accounts/login-b/?targetUrl=https%3A%2F%2Fneo4j.com%2Fgraphacademy%2Ftraining-gdsaa-40%2Fenrollment%2F%3F_gl%3D1*19npgd8*_ga*Nzk5OTIyMDI3LjE2MDQwMDU4ODE.*_ga_DL38Q8KGQC*MTYxMTYzMjQxNy4zOTEuMS4xNjExNjMyNDg5LjA.%26_ga%3D2.66617898.542080118.1611332959-799922027.1604005881
and the page says "redirecting" but does nothing for a few seconds (minutes?). Then it shows:
Oops!, something went wrong
Callback URL mismatch.
The provided redirect_uri is not in the list of allowed callback URLs.
Please go to the Application Settings page and make sure you are sending a valid callback url from your application.
The javascript webpage contents (prior to redirection) is:
<!--PAGE CONTENTS-->
<html>
<head>
<meta name="robots" content="noindex,nofollow" />
<script type="text/javascript" src="/ruxitagentjs_ICA2SVfqru_10207210122091729.js" data-dtconfig="rid=RID_1565912465|rpid=451660422|domain=neo4j.com|reportUrl=/rb_bf86984hyn|app=ea7c4b59f27d43eb|featureHash=ICA2SVfqru|vcv=2|rdnt=1|uxrgce=1|bp=3|cuc=j9w0p5lz|mel=100000|dpvc=1|lastModification=1611614464986|dtVersion=10207210122091729|tp=500,50,0,1|uxdcw=1500|vs=2|agentUri=/ruxitagentjs_ICA2SVfqru_10207210122091729.js"></script><script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/url-search-params/0.10.0/url-search-params.js"></script>
<script src="https://cdn.auth0.com/js/auth0/9.0.0/auth0.min.js"></script>
<script type="text/javascript">
const clientID = "hoNo6B00ckfAoFVzPTqzgBIJHFHDnHYu";
const domain = "login.neo4j.com";
const queryString = new URLSearchParams(window.location.search);
const targetUrl = queryString.get("targetUrl");
var redirectUri = "https://neo4j.com/accounts/login-b/";
var graphconnectRegex = RegExp("^https://neo4j.com/.*");
if (targetUrl != null) {
redirectUri = redirectUri + "?targetUrl=" + encodeURIComponent(targetUrl);
}
var auth0 = new auth0.WebAuth({
domain: domain,
clientID: clientID,
responseType: "token id_token",
redirectUri: redirectUri,
audience: "neo4j://accountinfo/",
scope: "read:account-info write:account-info openid email profile"
});
</script>
</head>
<body>
<div>
Redirecting.
</div>
<script type="text/javascript">
function handleAuthResult(authResult) {
if(!targetUrl || targetUrl===null){
console.error('Target URL not provided.');
return;
}
if (targetUrl != null) {
console.log("Redirecting to: " + targetUrl);
if(targetUrl.indexOf('docs-neo4j.netlify.app') > -1){
window.location = targetUrl;
return;
}
if(!graphconnectRegex.test(targetUrl) && targetUrl.indexOf('localhost:3000') === -1){
console.error('Redirect URL is not a GraphAcademy URL. Not redirecting.');
return;
}
window.location = targetUrl;
}
}
function checkAuth(){
auth0.parseHash({ hash: window.location.hash }, function (err, authResult) {
console.log(err, authResult);
if (err == null && authResult != null && "idToken" in authResult) {
handleAuthResult(authResult, "parseHash");
} else {
auth0.checkSession({}, function (err, authResult) {
if (authResult) {
handleAuthResult(authResult);
} else {
console.group("ACCOUNTS: auth0 checkSession error response:");
console.log(err);
if (window.parent != window.top) {
window.parent.postMessage({ status: 'failure' }, 'https://neo4j.com');
} else {
// manually authorize
auth0.authorize();
}
}
});
}
});
}
checkAuth();
</script>
</body>
</html>
<!--END CONTENT-->
After the redirection, the page contents is:
||<html>|
| --- | --- |
||<head>|
||<meta charset="utf-8">|
||<link href="https://cdn.auth0.com/styleguide/latest/index.min.css" rel="stylesheet" />|
||<link rel="stylesheet" href="https://cdn.auth0.com/backend-templates/main.css">|
||<meta name="viewport" content="width=device-width, initial-scale=1">|
||<title>Neo4j</title>|
||</head>|
||<body>|
||<div class="unhandled-error-cont tenant-error-cont has-logo">|
||<div class="error-header">|
||<span class="error-icon">|
|||
||<span class="error-logo" style="background-image: url('https://go.neo4j.com/rs/710-RRC-335/images/neo4j_logo_globe.png?_ga=2.98385887.1312800735.1517634821-1790589457.1517634821');"></span>|
|||
||</span>|
||<h3 class="error-title">Neo4j</h3>|
|||
||<h3 class="error-subtitle">Oops!, something went wrong</h3>|
|||
||</div>|
||<div class="error-body">|
||<p class="error-message">|
|||
||Callback URL mismatch.<br/>|
||The provided redirect_uri is not in the list of allowed callback URLs.<br/>|
||Please go to the <a target="_new" href="https://manage.auth0.com/#/applications/hoNo6B00ckfAoFVzPTqzgBIJHFHDnHYu/settings">Application Settings page</a> and make sure you are sending a valid callback url from your application.|
|||
||</p>|
||</div>|
||<div class="error-footer">|
||<div class="footer-groups cf">|
||<span class="footer-group">|
||<i class="footer-group-icon read-docs"></i>|
||<h4 class="footer-group-title">TECHNICAL DETAILS</h4>|
||<a href="[#](https://login.neo4j.com/authorize?client_id=hoNo6B00ckfAoFVzPTqzgBIJHFHDnHYu&response_type=token%20id_token&redirect_uri=https%3A%2F%2Fneo4j.com%2Faccounts%2Flogin-b%2F%3FtargetUrl%3Dhttps%253A%252F%252Fneo4j.com%252Fgraphacademy%252Ftraining-gdsaa-40%252Fenrollment%252F%253F_gl%253D1%2Az1jlw5%2A_ga%2ANzk5OTIyMDI3LjE2MDQwMDU4ODE.%2A_ga_DL38Q8KGQC%2AMTYxMTYzMjQxNy4zOTEuMS4xNjExNjMyNTgxLjA.%2526_ga%253D2.237856516.542080118.1611332959-799922027.1604005881&scope=read%3Aaccount-info%20write%3Aaccount-info%20openid%20email%20profile&audience=neo4j%3A%2F%2Faccountinfo%2F&state=0k3hzG7UrZfVOq1YyiZs02BQQNhuyRF5&nonce=rY-~LDZEn2cyg-XmT99h0.L9~6BYDNtr&auth0Client=eyJuYW1lIjoiYXV0aDAuanMiLCJ2ZXJzaW9uIjoiOS4wLjAifQ%3D%3D#)" class="toggle-details">See details for this error</a>|
||</span>|
||<span class="footer-group">|
||<h4 class="footer-group-title">SUPPORT</h4>|
|||
|||
||<a href="[https://support.neo4j.com](https://support.neo4j.com/)" class="footer-group-link has-icon customer-support">Get Help</a>|
|||
|||
||<a href="mailto:devrel@neo4j.com" class="footer-group-link has-icon mail">devrel@neo4j.com</a>|
|||
|||
||</span>|
||</div>|
||<div class="error-details">|
||<p class="error-status">|
|||
||<strong>unauthorized_client</strong>: Callback URL mismatch. https://neo4j.com/accounts/login-b/?targetUrl=https%3A%2F%2Fneo4j.com%2Fgraphacademy%2Ftraining-gdsaa-40%2Fenrollment%2F%3F_gl%3D1*z1jlw5*_ga*Nzk5OTIyMDI3LjE2MDQwMDU4ODE.*_ga_DL38Q8KGQC*MTYxMTYzMjQxNy4zOTEuMS4xNjExNjMyNTgxLjA.%26_ga%3D2.237856516.542080118.1611332959-799922027.1604005881 is not in the list of allowed callback URLs|
|||
||</p>|
|||
||<a href="https://manage.auth0.com/#/logs/" target="_new" class="view-logs-btn">VIEW LOG</a>|
|||
|||
|||
||<span class="error-id">|
||<span class="error-id-title">TRACKING ID: </span><span class="error-id-content">77574ea83717631fa208</span>|
||</span>|
|||
||</div>|
||</div>|
||</div>|
||<script src="https://cdn.auth0.com/backend-templates/main.js?v=1"></script>|
||</body>|
||</html>|
|||
I followed your link and it works for me... Can you try again?
clem
(Clem)
January 26, 2021, 7:04pm
6
Works for me now. I'm not sure why I got the problem that I did.
Vagaries of the internet!