Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 whilst saving permission graph with Postgres #10170

Open
funcius opened this issue Jun 14, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@funcius
Copy link

commented Jun 14, 2019

I have Error 500 whilst trying to save the permission graph.
The 'Save changes' bar stays after I try to save the changes and no change is saved.
image
The log:

Jun 14 05:12:53 ERROR metabase.middleware.log :: PUT /api/permissions/graph 500 45 ms (6 DB calls) 
{:message
"ERROR: function concat(character varying, unknown) does not exist\n Hint: No function matches the given name and argument types. You might need to add explicit type casts.\n Position: 86",
:type org.postgresql.util.PSQLException,
:stacktrace
("org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)"
"org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)"
"org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)"
"org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)"
"org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)"
"org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)"
"org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:106)"
"com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:379)"
"clojure.java.jdbc$execute_query_with_params.invokeStatic(jdbc.clj:1072)"
"clojure.java.jdbc$execute_query_with_params.invoke(jdbc.clj:1066)"
"clojure.java.jdbc$db_query_with_resultset_STAR_.invokeStatic(jdbc.clj:1088)"
"clojure.java.jdbc$db_query_with_resultset_STAR_.invoke(jdbc.clj:1075)"
"clojure.java.jdbc$query.invokeStatic(jdbc.clj:1164)"
"clojure.java.jdbc$query.invoke(jdbc.clj:1126)"
"toucan.db$query.invokeStatic(db.clj:274)"
"toucan.db$query.doInvoke(db.clj:270)"
"clojure.lang.RestFn.invoke(RestFn.java:410)"
"toucan.db$simple_select.invokeStatic(db.clj:378)"
"toucan.db$simple_select.invoke(db.clj:367)"
"toucan.db$select.invokeStatic(db.clj:646)"
"toucan.db$select.doInvoke(db.clj:640)"
"clojure.lang.RestFn.applyTo(RestFn.java:139)"
"clojure.core$apply.invokeStatic(core.clj:667)"
"clojure.core$apply.invoke(core.clj:660)"
"toucan.db$select_field.invokeStatic(db.clj:669)"
"toucan.db$select_field.doInvoke(db.clj:661)"
"clojure.lang.RestFn.invoke(RestFn.java:442)"
"--> models.permissions$fn__25447$delete_related_permissions_BANG___25452$fn__25453.invoke(permissions.clj:414)"
"models.permissions$fn__25447$delete_related_permissions_BANG___25452.doInvoke(permissions.clj:385)"
"models.permissions$revoke_native_permissions_BANG_.invokeStatic(permissions.clj:451)"
"models.permissions$revoke_native_permissions_BANG_.invoke(permissions.clj:448)"
"models.permissions$fn__25553$update_native_permissions_BANG___25558$fn__25559.invoke(permissions.clj:541)"
"models.permissions$fn__25553$update_native_permissions_BANG___25558.invoke(permissions.clj:535)"
"models.permissions$fn__25579$update_db_permissions_BANG___25584$fn__25585.invoke(permissions.clj:552)"
"models.permissions$fn__25579$update_db_permissions_BANG___25584.invoke(permissions.clj:549)"
"models.permissions$fn__25611$update_group_permissions_BANG___25616$fn__25617.invoke(permissions.clj:564)"
"models.permissions$fn__25611$update_group_permissions_BANG___25616.invoke(permissions.clj:561)"
"models.permissions$fn__25656$update_graph_BANG___25665$fn__25666$fn__25670.invoke(permissions.clj:614)"
"models.permissions$fn__25656$update_graph_BANG___25665$fn__25666.invoke(permissions.clj:612)"
"models.permissions$fn__25656$update_graph_BANG___25665.invoke(permissions.clj:600)"
"api.permissions$fn__57868.invokeStatic(permissions.clj:80)"
"api.permissions$fn__57868.invoke(permissions.clj:68)"
"middleware.auth$enforce_authentication$fn__59926.invoke(auth.clj:14)"
"routes$fn__61084$fn__61085.doInvoke(routes.clj:56)"
"middleware.exceptions$catch_uncaught_exceptions$fn__60017.invoke(exceptions.clj:104)"
"middleware.exceptions$catch_api_exceptions$fn__60014.invoke(exceptions.clj:92)"
"middleware.log$log_api_call$fn__61458$fn__61459.invoke(log.clj:170)"
"middleware.log$log_api_call$fn__61458.invoke(log.clj:164)"
"middleware.security$add_security_headers$fn__59980.invoke(security.clj:105)"
"middleware.json$wrap_json_body$fn__61163.invoke(json.clj:61)"
"middleware.json$wrap_streamed_json_response$fn__61181.invoke(json.clj:97)"
"middleware.session$bind_current_user$fn__58593$fn__58594.invoke(session.clj:193)"
"middleware.session$do_with_current_user.invokeStatic(session.clj:176)"
"middleware.session$do_with_current_user.invoke(session.clj:170)"
"middleware.session$bind_current_user$fn__58593.invoke(session.clj:192)"
"middleware.session$wrap_current_user_id$fn__58582.invoke(session.clj:161)"
"middleware.session$wrap_session_id$fn__58567.invoke(session.clj:123)"
"middleware.auth$wrap_api_key$fn__59934.invoke(auth.clj:27)"
"middleware.misc$maybe_set_site_url$fn__61523.invoke(misc.clj:58)"
"middleware.misc$bind_user_locale$fn__61526.invoke(misc.clj:74)"
"middleware.misc$add_content_type$fn__61511.invoke(misc.clj:30)"
"middleware.misc$disable_streaming_buffering$fn__61548.invoke(misc.clj:119)"
"middleware.misc$wrap_gzip$fn__61541.invoke(misc.clj:101)"),
:sql-exception-chain
["PSQLException:"
"Message: ERROR: function concat(character varying, unknown) does not exist"
"Hint: No function matches the given name and argument types. You might need to add explicit type casts."
"Position: 86"
"SQLState: 42883"
"Error Code: 0"]}

Bugs

If you're filing an issue about a bug please include as much information
as you can including the following.

  • Your browser and the version: Chrome Version 75.0.3770.80

  • Your operating system: Windows 10

  • Your databases: Postgres

  • Metabase version: 0.32.8

  • Metabase hosting environment: Docker

  • Metabase internal database: Postgres

  • Repeatable steps to reproduce the issue

Thanks for being part of the Metabase project!

@mazameli

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2019

Hmm, I couldn't reproduced this on 0.32.8 or master. My app db is H2 rather than postgres. Are you seeing any JavaScript console errors?

@funcius

This comment has been minimized.

Copy link
Author

commented Jun 25, 2019

hi @mazameli
this is what i have from the browser console. see if it can help identify what went wrong...
p.s. we use postgres as app db

app-main.bundle.js?0…325582067a4b57db2:5 PUT http://999.oasispms.com:3000/api/permissions/graph 500 (Server Error)
app-main.bundle.js?0…325582067a4b57db2:5 Uncaught (in promise) 
{status: 500, data: {…}, isCancelled: false}
data:
error: ["schema.utils.NamedError@71fdc948"]
message: "Input to update-graph! does not match schema: ↵↵	 �[0;33m  [(named {:groups {1 {(not ("Integer greater than zero" -1337)) invalid-key}}} new-graph)] �[0m ↵↵"
stacktrace: Array(24)
0: "--> models.permissions$fn__26029$update_graph_BANG___26038.invoke(permissions.clj:603)"
1: "api.permissions$fn__59620.invokeStatic(permissions.clj:80)"
2: "api.permissions$fn__59620.invoke(permissions.clj:68)"
3: "middleware.auth$enforce_authentication$fn__61677.invoke(auth.clj:14)"
4: "routes$fn__62814$fn__62815.doInvoke(routes.clj:56)"
5: "middleware.exceptions$catch_uncaught_exceptions$fn__61768.invoke(exceptions.clj:104)"
6: "middleware.exceptions$catch_api_exceptions$fn__61765.invoke(exceptions.clj:92)"
7: "middleware.log$log_api_call$fn__63188$fn__63189.invoke(log.clj:170)"
8: "middleware.log$log_api_call$fn__63188.invoke(log.clj:164)"
9: "middleware.security$add_security_headers$fn__61731.invoke(security.clj:105)"
10: "middleware.json$wrap_json_body$fn__62893.invoke(json.clj:61)"
11: "middleware.json$wrap_streamed_json_response$fn__62911.invoke(json.clj:97)"
12: "middleware.session$bind_current_user$fn__60345$fn__60346.invoke(session.clj:193)"
13: "middleware.session$do_with_current_user.invokeStatic(session.clj:176)"
14: "middleware.session$do_with_current_user.invoke(session.clj:170)"
15: "middleware.session$bind_current_user$fn__60345.invoke(session.clj:192)"
16: "middleware.session$wrap_current_user_id$fn__60334.invoke(session.clj:161)"
17: "middleware.session$wrap_session_id$fn__60319.invoke(session.clj:123)"
18: "middleware.auth$wrap_api_key$fn__61685.invoke(auth.clj:27)"
19: "middleware.misc$maybe_set_site_url$fn__63253.invoke(misc.clj:58)"
20: "middleware.misc$bind_user_locale$fn__63256.invoke(misc.clj:74)"
21: "middleware.misc$add_content_type$fn__63241.invoke(misc.clj:30)"
22: "middleware.misc$disable_streaming_buffering$fn__63278.invoke(misc.clj:119)"
23: "middleware.misc$wrap_gzip$fn__63271.invoke(misc.clj:101)"
length: 24
__proto__: Array(0)
type: "class clojure.lang.ExceptionInfo"
value: [{…}]
__proto__: Object
isCancelled: false
status: 500
__proto__: Object
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.