Exception with Glue Backend API Module

muhammad.jadoon
muhammad.jadoon Spryker Solution Partner Posts: 7 🧑🏻‍🚀 - Cadet

I followed this tutorial https://docs.spryker.com/docs/scos/dev/glue-api-guides/202311.0/routing/create-backend-resources.html to create a backend resource for Glue Backend API. But I am getting this error. Can anyone please help me with what might be the problem?

GLUE_BACKEND Exception

Spryker\Shared\Kernel\Transfer\Exception\NullValueException - Property "application" of transfer `Generated\Shared\Transfer\GlueRequestTransfer` is null.

in /data/vendor/spryker/kernel/src/Spryker/Shared/Kernel/Transfer/AbstractTransfer.php (469)

Url:/article-numbers-export/1

Trace:

#0 /data/src/Generated/Shared/Transfer/GlueRequestTransfer.php(1069): Spryker\Shared\Kernel\Transfer\AbstractTransfer->throwNullValueException('application')
#1 /data/vendor/spryker/glue-application/src/Spryker/Glue/GlueApplication/Router/CustomRouteRouter/CustomRouteMatcher.php(42): Generated\Shared\Transfer\GlueRequestTransfer->getApplicationOrFail()
#2 /data/vendor/spryker/glue-application/src/Spryker/Glue/GlueApplication/Router/RouteMatcherCollection.php(67): Spryker\Glue\GlueApplication\Router\CustomRouteRouter\CustomRouteMatcher->route(Object(Generated\Shared\Transfer\GlueRequestTransfer))
#3 /data/vendor/spryker/glue-application/src/Spryker/Glue/GlueApplication/ApiApplication/RequestFlowExecutor.php(97): Spryker\Glue\GlueApplication\Router\RouteMatcherCollection->route(Object(Generated\Shared\Transfer\GlueRequestTransfer))
#4 /data/vendor/spryker/glue-application/src/Spryker/Glue/GlueApplication/ApiApplication/ApiApplicationProxy.php(141): Spryker\Glue\GlueApplication\ApiApplication\RequestFlowExecutor->executeRequestFlow(Object(Generated\Shared\Transfer\GlueRequestTransfer), Object(Spryker\Glue\GlueBackendApiApplication\Application\GlueBackendApiApplication), NULL)
#5 /data/public/GlueBackend/index.php(20): Spryker\Glue\GlueApplication\ApiApplication\ApiApplicationProxy->run()
#6 {main}

Tagged:

Best Answer

  • profuel
    profuel SSA Sprykee Posts: 63 🪐 - Explorer
    Answer ✓

    Hi, Muhammad!

    There are many possible issues that could lead to this error.

    As for me , the most prominent issue could be missing \Spryker\Glue\GlueBackendApiApplication\Plugin\GlueApplication\ApplicationIdentifierRequestBuilderPlugin in the GlueBackendApiApplicationDependencyProvider::getRequestBuilderPlugins on the project level.

    Please let me know if it helps!

Answers

  • profuel
    profuel SSA Sprykee Posts: 63 🪐 - Explorer
    Answer ✓

    Hi, Muhammad!

    There are many possible issues that could lead to this error.

    As for me , the most prominent issue could be missing \Spryker\Glue\GlueBackendApiApplication\Plugin\GlueApplication\ApplicationIdentifierRequestBuilderPlugin in the GlueBackendApiApplicationDependencyProvider::getRequestBuilderPlugins on the project level.

    Please let me know if it helps!

  • muhammad.jadoon
    muhammad.jadoon Spryker Solution Partner Posts: 7 🧑🏻‍🚀 - Cadet

    Thank you. That was the problem 🙂 Resolved.