Git Product home page Git Product logo

Comments (7)

stianst avatar stianst commented on July 20, 2024

Hi, can you please add some more details to issue?

from keycloak-quickstarts.

remithomasn7 avatar remithomasn7 commented on July 20, 2024

I do encounter the exact same behaviour.

How to reproduce ?

Simply start a docker container with the following command line
docker run -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin quay.io/keycloak/keycloak:latest

Then login as admin user. Finally click on Add realm the Select File.

The Keycloak UI page (in your browser) will display an error message : Error! An unexpected server error has occurred

Anything else ?

I took a quick look at the browser debug console. I can read the following 500 error

Possibly unhandled rejection: {"data":{"error":"unknown_error"},"status":500,"config":{"method":"POST","transformRequest":[null,null],"transformResponse":[null],"jsonpCallbackParam":"callback","data":{"realm":"... (the realm json content)

I equally notice that the first committed version of the json is valid.

from keycloak-quickstarts.

remithomasn7 avatar remithomasn7 commented on July 20, 2024

Hummm, after a quick look at the project (mainly the readme), I realized I did not load the js policies in KC before importing the realm. It now makes sense that loading the json realm failed.

However I encountered another issue (trying to properly follow the readme). I was not able to do mvn clean install. I faced the following issue:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.6:war (default-war) on project photoz-uma-restful-api: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.6:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.6' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null

from keycloak-quickstarts.

Shawydu avatar Shawydu commented on July 20, 2024

got the same error on mvn clean install, is there any update?

from keycloak-quickstarts.

Kostanos avatar Kostanos commented on July 20, 2024

I'm following README of photoz and getting the error of importing realm in keycloak 18

2022-08-11 08:41:40,290 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-13) Uncaught server error: java.lang.RuntimeException: Error while importing policy [Only Owner and Administrators Policy].
	at org.keycloak.models.utils.RepresentationToModel.importPolicies(RepresentationToModel.java:2393)
	at org.keycloak.models.utils.RepresentationToModel.toModel(RepresentationToModel.java:2353)
	at org.keycloak.models.utils.RepresentationToModel.importAuthorizationSettings(RepresentationToModel.java:2300)
	at org.keycloak.models.utils.RepresentationToModel.lambda$importRealmAuthorizationSettings$9(RepresentationToModel.java:2278)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
...

I guess it is missing some step for this role creation

from keycloak-quickstarts.

dsummersl avatar dsummersl commented on July 20, 2024

You need to install the policies in order to import the realm:

 mvn clean install

# add the policies jar file to the container in /opt/keycloak/providers
docker run -p 8180:8180 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin -v $PWD/photoz-js-policies/target/photoz-uma-js-policies.jar:/opt/keycloak/providers/photoz-uma-js-policies.jar quay.io/keycloak/keycloak:18.0.2 start-dev --http-port 8180 --http-relative-path 

From there you can 'add role' and import the photos-realm.json file.

from keycloak-quickstarts.

pedroigor avatar pedroigor commented on July 20, 2024

Closing as outdated. The repository no longer provides examples about UMA.

from keycloak-quickstarts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.