maxmin93 / agensbrowser-v2

Backup of AgensBrowser v2.0
0 stars 1 forks source link

Error "agens is not defined" occured and cypher query cannot finish #1

Closed fourmicao closed 2 years ago

fourmicao commented 2 years ago

I can build and run the project succesfully, but when I access http://localhost:8085/ in Chrome, errors occurred and I cannot execute cyper query. AgensGraph configuration is OK,

agens.datasource.url = jdbc:agensgraph://127.0.0.1:5432/postgres?ApplicationName=AgensBrowser agens.datasource.schema = privdb ============================================== AgensBrowser web v2.0 (since 2018-12-17) ============================================== check version of AgensGraph ... v1.2 or under first loading META-info of AgensGraph starts... reload[000]: privdb,labels=15(6/9),relations=9,isDirty=false ==> OK! healthInfo ==> {"product_version":"2.0","user_name":"agens","established_connections":1,"idle_connections":1,"descriptio n":"","busy_connections":0,"jdbc_url":"jdbc:agensgraph:\/\/127.0.0.1:5432\/postgres?ApplicationName=AgensBrowser","produ ct_name":"AgensBrowser-web","test_time":"2022-06-20 09:18:55","cp_type":"hikari","schema_image":"","active_sessions":0," group":"health","is_closed":false} reload[001]: privdb,labels=15(6/9),relations=9,isDirty=false ==> OK! Chrome errors: scripts.bc861eede1f7cd0cd265.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'layoutBase') at Object. (scripts.bc861eede1f7cd0cd265.js:1:1273476) at n (scripts.bc861eede1f7cd0cd265.js:1:1273025) at scripts.bc861eede1f7cd0cd265.js:1:1273399 at scripts.bc861eede1f7cd0cd265.js:1:1273408 at window.agens (scripts.bc861eede1f7cd0cd265.js:1:1272878) at scripts.bc861eede1f7cd0cd265.js:1:1272892 main.acd9e02d06c36975588d.js:1 ERROR ReferenceError: agens is not defined at e.ngOnInit (main.acd9e02d06c36975588d.js:1:1957338) at main.acd9e02d06c36975588d.js:1:281009 at main.acd9e02d06c36975588d.js:1:281052 at ea (main.acd9e02d06c36975588d.js:1:282375) at ka (main.acd9e02d06c36975588d.js:1:290400) at Object.updateDirectives (main.acd9e02d06c36975588d.js:1:2011865) at Object.updateDirectives (main.acd9e02d06c36975588d.js:1:287187) at Ql (main.acd9e02d06c36975588d.js:1:278956) at sa (main.acd9e02d06c36975588d.js:1:285900) at aa (main.acd9e02d06c36975588d.js:1:285563) main.acd9e02d06c36975588d.js:1 ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of null (reading 'on') TypeError: Cannot read properties of null (reading 'on') at main.acd9e02d06c36975588d.js:1:1957818 at e.invoke (polyfills.b61aaac4a6bd7b8808f7.js:1:7375) at Object.onInvoke (main.acd9e02d06c36975588d.js:1:204462) at e.invoke (polyfills.b61aaac4a6bd7b8808f7.js:1:7315) at t.run (polyfills.b61aaac4a6bd7b8808f7.js:1:2578) at polyfills.b61aaac4a6bd7b8808f7.js:1:14042 at e.invokeTask (polyfills.b61aaac4a6bd7b8808f7.js:1:8059) at Object.onInvokeTask (main.acd9e02d06c36975588d.js:1:204374) at e.invokeTask (polyfills.b61aaac4a6bd7b8808f7.js:1:7980) at t.runTask (polyfills.b61aaac4a6bd7b8808f7.js:1:3241) at j (polyfills.b61aaac4a6bd7b8808f7.js:1:13291) at polyfills.b61aaac4a6bd7b8808f7.js:1:14098 at e.invokeTask (polyfills.b61aaac4a6bd7b8808f7.js:1:8059) at Object.onInvokeTask (main.acd9e02d06c36975588d.js:1:204374) at e.invokeTask (polyfills.b61aaac4a6bd7b8808f7.js:1:7980) at t.runTask (polyfills.b61aaac4a6bd7b8808f7.js:1:3241) at y (polyfills.b61aaac4a6bd7b8808f7.js:1:10326) at t.invokeTask (polyfills.b61aaac4a6bd7b8808f7.js:1:9171) at invoke (polyfills.b61aaac4a6bd7b8808f7.js:1:9033) at n.args. (polyfills.b61aaac4a6bd7b8808f7.js:1:27171) main.acd9e02d06c36975588d.js:1 ERROR TypeError: Cannot read properties of null (reading 'add') at t._next (main.acd9e02d06c36975588d.js:1:1961919) at t.__tryOrUnsub (main.acd9e02d06c36975588d.js:1:396897) at t.next (main.acd9e02d06c36975588d.js:1:396042) at t._next (main.acd9e02d06c36975588d.js:1:395086) at t.next (main.acd9e02d06c36975588d.js:1:394757) at t._next (main.acd9e02d06c36975588d.js:1:674472) at t.next (main.acd9e02d06c36975588d.js:1:394757) at t._next (main.acd9e02d06c36975588d.js:1:395086) at t.next (main.acd9e02d06c36975588d.js:1:394757) at t.next (main.acd9e02d06c36975588d.js:1:514756) main.acd9e02d06c36975588d.js:1 ERROR TypeError: Cannot read properties of null (reading 'add') at t._next (main.acd9e02d06c36975588d.js:1:1962051) at t.__tryOrUnsub (main.acd9e02d06c36975588d.js:1:396897) at t.next (main.acd9e02d06c36975588d.js:1:396042) at t._next (main.acd9e02d06c36975588d.js:1:395086) at t.next (main.acd9e02d06c36975588d.js:1:394757) at t._next (main.acd9e02d06c36975588d.js:1:674472) at t.next (main.acd9e02d06c36975588d.js:1:394757) at t._next (main.acd9e02d06c36975588d.js:1:395086) at t.next (main.acd9e02d06c36975588d.js:1:394757) at t.next (main.acd9e02d06c36975588d.js:1:514756) main.acd9e02d06c36975588d.js:1 ERROR TypeError: Cannot read properties of null (reading 'style') at e.showGraph (main.acd9e02d06c36975588d.js:1:1963135) at t._next (main.acd9e02d06c36975588d.js:1:1962156) at t.__tryOrUnsub (main.acd9e02d06c36975588d.js:1:396897) at t.next (main.acd9e02d06c36975588d.js:1:396042) at t._next (main.acd9e02d06c36975588d.js:1:395086) at t.next (main.acd9e02d06c36975588d.js:1:394757) at t._next (main.acd9e02d06c36975588d.js:1:674472) at t.next (main.acd9e02d06c36975588d.js:1:394757) at t._next (main.acd9e02d06c36975588d.js:1:395086) at t.next (main.acd9e02d06c36975588d.js:1:394757) Because object "agnes" is not found, all the query failed, even the page generate no errors. I tried UMD mode to rewrited and load "agens-graph.js" in index.html, but still got many errors. Can you give me some hint? Thanks a lot!
fourmicao commented 2 years ago

I found solution for Error: Object "agens" is not found. Because agens is an IIFE function, angular cannot load and execute properly, I modified index.html to include js script file and it is okay now. There are several other errors to fix and all done in an ugly style :(. Anyway, agensbrowserV2 is a very great project, it is a good start to learn how to integrate cytoscape into angular project. Thank you, Maxmin93!