Dynamic Image not rendering on pdfs


  • administrators

    hmm for some reason phantomjs is failing when creating a https request and that is weird.., what OS your server has? what version of jsreport are you using? can you try in another different machine and see if it works?


  • administrators

    also please share here your jsreport config.



  • Ubuntu 16.04
    jsreport 1.7.0 development (We think)

    jsreport config:

    {
    "httpsPort": 3000,
    "certificate": {
    "key": "",
    "cert": "
    "
    },
    "authentication": {
    "cookieSession": {
    "secret": "i have no idea"
    },
    "admin": {
    "username": "",
    "password": "
    "
    },
    "enabled": true
    },
    "connectionString": {
    "name": "fs"
    },
    "logger": {
    "console": {
    "transport": "console",
    "level": "debug"
    },
    "file": {
    "transport": "file",
    "level": "info",
    "filename": "logs/reporter.log"
    },
    "error": {
    "transport": "file",
    "level": "error",
    "filename": "logs/error.log"
    }
    },
    "blobStorage": "fileSystem",
    "phantom": {
    "allowLocalFilesAccess": false,
    "strategy": "phantom-server",
    "timeout": 40000
    },
    "electron": {
    "allowLocalFilesAccess": false,
    "strategy": "electron-ipc",
    "timeout": 40000
    },
    "tasks": {
    "strategy": "http-server",
    "timeout": 10000
    },
    "scripts": {
    "allowedModules": ["mailgun-js"],
    "timeout": 40000
    },
    "sample-template": {
    "createSamples": false
    },
    "license-key" : "***",
    "daemon" : true
    }

    Anything with *** is just redacted info. Another note, this was working for us like last week, but we haven't changed anything



  • It seems some of the * didn't make it. All of the above fields do have info in it, but we've redacted confidential info for our safety


  • administrators

    hmm i don't see anything wrong in your configuration, one thing to try can be to change phanthom strategy to dedicated-process and see if it changes something.

    our playground website is also running ubuntu so everything seems to point to some network block.

    Another note, this was working for us like last week, but we haven't changed anything

    hard to tell why https urls stopped working, since you haven't changed anything on the server (installed new programs or something like that) all of this looks like some block in the network layer or probably your phantomjs executable is corrupted (maybe OpenSSL in your server is not behaving correctly).

    the best would be to try on a different server with the same OS and check if it render the PDF there, if it works in another similar server then something was changed in your server but probably you did not notice.



  • dedicated-process didn't fix it

    we can wget the image/https resource from the box so we don't believe it's a network block

    We can try a new server but it will take awhile, will report back with any new developments

    Thanks


  • administrators

    @nuvsol thanks! let us know how the test goes, or anything relevant that you find.



  • @bjrmatos playground doesn't run on ubuntu :)

    I've Ubuntu 16.04. Running template with this particular image works there. I did also run apt-get update + apt-get upgrade, reboot and image still displays.
    There is likely something wrong between phantomjs and installed ssl libs. Unfortunately I'm not an expert on this.

    Maybe you could quickly run jsreport using docker on the particular server and test the same image. I think this would give us the answer if the issue is with the installed libs or the networking.



  • So we tried with our old server (we have two report servers) and it seemed to work. The only problem is that this other server isn't https.



  • Ok had some time to look into this and got a fix.
    Installing and switching PhantomJS from v1.9.8 to v2.1.1 seems to work.


Log in to reply
 

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