Docker - Embedding assets as links dont work

  • I have created simple playground example to explain the issue here: playground

    Following code works in public playground,

    <script src="{{asset "myAssets/Chart.min.js" "link"}}"></script>

    but It throws exception in Docker image(latest - 3.11.3):

    Report "template" render failed.
    Error when evaluating engine handlebars for template /myTemplate/template
    (because) "asset" helper call failed
    (because) asset myAssets/Chart.min.js not found

    I also tried to use asset path starting with slash:

    <script src="{{asset "/myAssets/Chart.min.js" "link"}}"></script>

    It renders without error in Docker, but asset is not loaded - url contains two slashes: http://localhost:5488/assets/content//myAssets/Chart.min.js

    Thanks for help.

  • Thanks for the nice problem description. It is a bug. I've pushed the fix which we should release at the end of the next week. Please use assets without link encoding till then.

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.