CoreMedia / content-sync-example

Other
2 stars 4 forks source link

Starting partial sync into empty local docker-compose environment does not work / leads to NullPointerException #1

Closed blackappsolutions closed 3 years ago

blackappsolutions commented 3 years ago

Describe the bug Starting partial sync into empty local docker-compose environment does not work / leads to NullPointerException

workflow-server              | 2021-05-03 15:53:15 - [ERROR] com.coremedia.workflow.impl.server.LongAction [] - LongAction com.coremedia.blueprint.contentsync.workflow.action.CreateAndLinkContents: extract params failed (TransactionRunner-19 for coremedia:///cap/task/1/2)
workflow-server              | java.lang.NullPointerException: null
workflow-server              |  at okhttp3.HttpUrl$Builder.parse(HttpUrl.java:1313)
workflow-server              |  at okhttp3.HttpUrl.get(HttpUrl.java:917)
workflow-server              |  at okhttp3.HttpUrl.parse(HttpUrl.java:905)
workflow-server              |  at com.coremedia.blueprint.contentsync.client.http.IAPIHttpClientImpl.createBaseRequest(IAPIHttpClientImpl.java:69)
workflow-server              |  at com.coremedia.blueprint.contentsync.client.http.IAPIHttpClientImpl.init(IAPIHttpClientImpl.java:35)
workflow-server              |  at com.coremedia.blueprint.contentsync.client.IAPIContext.prepareClient(IAPIContext.java:68)
workflow-server              |  at com.coremedia.blueprint.contentsync.client.IAPIContext.build(IAPIContext.java:80)
workflow-server              |  at com.coremedia.blueprint.contentsync.workflow.action.CreateAndLinkContents$ActionParameters.<init>(CreateAndLinkContents.java:340)
workflow-server              |  at com.coremedia.blueprint.contentsync.workflow.action.CreateAndLinkContents.extractParameters(CreateAndLinkContents.java:83)
workflow-server              |  at com.coremedia.blueprint.contentsync.workflow.action.CreateAndLinkContents.extractParameters(CreateAndLinkContents.java:46)
workflow-server              |  at com.coremedia.workflow.impl.server.beanparser.LongActionAdapter.extractParameters(LongActionAdapter.java:44)
workflow-server              |  at com.coremedia.workflow.impl.server.LongAction.extractParameters(LongAction.java:73)

To Reproduce Steps to reproduce the behavior:

  1. In local studio (https://studio.docker.localhost/) as user admin => Click on Apps => Content Sync
  2. Selected some content
  3. Start Workflow
  4. UI looks like this grafik

Expected behavior Error should be transparent to the user / Content should be synced to local environment

Desktop (please complete the following information):

blackappsolutions commented 3 years ago

After a restart of the workflow-server (with debug enabled to do some remote debugging), everything went fine ... strange.

blackappsolutions commented 3 years ago

So now the error is reproducable. The error origines from the studio client. It is posting the wrong url

https://studio.docker.localhost/rest/api/contentsync/undefined/startworkflow/partialSync

Don't know where this jangaroo-javascript monster is loosing the choosen environment key.

Any help is appreciated.

blackappsolutions commented 3 years ago

It seems like only the first environment works.

blackappsolutions commented 3 years ago

I suppose this is the problematic code part => https://github.com/CoreMedia/content-sync-example/blob/27cf9db5523954135717b69e1117ac1d786b6a36/studio-client/src/main/joo/com/coremedia/blueprint/contentsync/studio/component/SettingsAwareRadioGroupBase.as#L47

blackappsolutions commented 3 years ago

@cmfgi has fixed this. Thanks.