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

Websocket handler failed with Thing ID 'thing-name-with-stripped-namespace' is not valid! #2096

Closed
alstanchev opened this issue Jan 16, 2025 · 1 comment · Fixed by #2097
Closed
Assignees
Labels
Milestone

Comments

@alstanchev
Copy link
Contributor

after add missing thingId to log of failed WoT validations there is a problem at ThingErrorResponse.java#L78 expecting the ENTITY_ID to contain a type prefix.

org.eclipse.ditto.things.model.ThingIdInvalidException: Thing ID 'type-stripped-entity-id' is not valid! at org.eclipse.ditto.things.model.ThingIdInvalidException$Builder.doBuild(ThingIdInvalidException.java:141) at org.eclipse.ditto.things.model.ThingIdInvalidException$Builder.doBuild(ThingIdInvalidException.java:122) at org.eclipse.ditto.base.model.exceptions.DittoRuntimeExceptionBuilder.build(DittoRuntimeExceptionBuilder.java:176) at org.eclipse.ditto.things.model.ThingId.wrapInThingIdInvalidException(ThingId.java:129) at org.eclipse.ditto.things.model.ThingId.of(ThingId.java:65) at java.base/java.util.Optional.map(Optional.java:260) at org.eclipse.ditto.things.model.signals.commands.ThingErrorResponse.of(ThingErrorResponse.java:79) at org.eclipse.ditto.gateway.service.endpoints.routes.websocket.WebSocketRoute.buildThingErrorResponse(WebSocketRoute.java:909) at org.eclipse.ditto.gateway.service.endpoints.routes.websocket.WebSocketRoute.jsonifiableToAdaptable(WebSocketRoute.java:898) at org.eclipse.ditto.gateway.service.endpoints.routes.websocket.WebSocketRoute.lambda$postprocess$ff444281$1(WebSocketRoute.java:765) at org.apache.pekko.stream.javadsl.Flow.$anonfun$mapAsync$1(Flow.scala:829) at org.apache.pekko.stream.impl.fusing.MapAsync$$anon$30.onPush(Ops.scala:1322) at org.apache.pekko.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:555) at org.apache.pekko.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:433) at org.apache.pekko.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:662) at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter$SimpleBoundaryEvent.execute(ActorGraphInterpreter.scala:71) at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter$SimpleBoundaryEvent.execute$(ActorGraphInterpreter.scala:67) at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter$BatchingActorInputBoundary$OnNext.execute(ActorGraphInterpreter.scala:114) at org.apache.pekko.stream.impl.fusing.GraphInterpreterShell.processEvent(ActorGraphInterpreter.scala:637) at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter.org$apache$pekko$stream$impl$fusing$ActorGraphInterpreter$$processEvent(ActorGraphInterpreter.scala:813) at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter$$anonfun$receive$1.applyOrElse(ActorGraphInterpreter.scala:831) at org.apache.pekko.actor.Actor.aroundReceive(Actor.scala:547) at org.apache.pekko.actor.Actor.aroundReceive$(Actor.scala:545) at org.apache.pekko.stream.impl.fusing.ActorGraphInterpreter.aroundReceive(ActorGraphInterpreter.scala:729) at org.apache.pekko.actor.ActorCell.receiveMessage(ActorCell.scala:590) at org.apache.pekko.actor.ActorCell.invoke(ActorCell.scala:557) at org.apache.pekko.dispatch.Mailbox.processMailbox(Mailbox.scala:280) at org.apache.pekko.dispatch.Mailbox.run(Mailbox.scala:241) at kamon.instrumentation.executor.ExecutorInstrumentation$InstrumentedForkJoinPool$TimingRunnable.run(ExecutorInstrumentation.scala:800) at org.apache.pekko.dispatch.ForkJoinExecutorConfigurator$PekkoForkJoinTask.exec(ForkJoinExecutorConfigurator.scala:57) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188) Caused by: org.eclipse.ditto.base.model.entity.id.NamespacedEntityIdInvalidException: Namespaced entity ID 'gateway-7b4135e9-5e5c-4238-8668-edb600a3afe2' is not valid! at org.eclipse.ditto.base.model.entity.id.NamespacedEntityIdInvalidException$Builder.doBuild(NamespacedEntityIdInvalidException.java:182) at org.eclipse.ditto.base.model.entity.id.NamespacedEntityIdInvalidException$Builder.doBuild(NamespacedEntityIdInvalidException.java:159) at org.eclipse.ditto.base.model.exceptions.DittoRuntimeExceptionBuilder.build(DittoRuntimeExceptionBuilder.java:176) at org.eclipse.ditto.base.model.entity.id.AbstractNamespacedEntityId.<init>(AbstractNamespacedEntityId.java:63) at org.eclipse.ditto.things.model.ThingId.<init>(ThingId.java:39) at org.eclipse.ditto.things.model.ThingId.lambda$of$0(ThingId.java:65) at org.eclipse.ditto.things.model.ThingId.wrapInThingIdInvalidException(ThingId.java:127) ... 31 common frames omitted

@alstanchev alstanchev added the bug label Jan 16, 2025
@thjaeckle thjaeckle added this to the 3.6.9 milestone Jan 16, 2025
@thjaeckle thjaeckle self-assigned this Jan 16, 2025
@thjaeckle
Copy link
Member

My bad :/

Thanks for the report, I'll provide a fix and a release, this is a nasty/blocking bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants