Unable to load pepper flash



  • Ubuntu updated today and now I'm getting this error when debugging my application:

    [1110/092238:ERROR:ppapi_thread.cc(331)] Failed to load Pepper module from /usr/lib/PepperFlash/libpepflashplayer.so (error: /usr/lib/PepperFlash/libpepflashplayer.so: cannot open shared object file: Operation not permitted)

    Before the update everything was running fine.

    OS: Ubuntu 16.04
    Kit: Desktop Qt 5.7.0 GCC 64bit


  • Moderators

    @RaquelCesar Try deleting .config/google-chrome/PepperFlash from home folder.



  • @p3c0 I did that and then restarted the system. Still getting the same error.



  • Is pepper flash running in your Chromium browser?
    Google recently announced they'll stop packaging their browser and pepper flash plugin together... so I guess you are using most recent Chromium web browser that comes packaged without pepper flash yet there must be a separate (system-wide) pepper flash package that should be pulled as dependency (or in case it is only 'recommended' then you must install it yourself - can you verify using you package manager if there is now separate pepper flash package and it is installed) Also during the split probably now system-wide pepper flash has move to a new (system-wide) location so can you verify that file is actually present with

    ls -la /usr/lib/PepperFlash/libpepflashplayer.so
    

    NB! QtWebEngine still uses older version that checks the old location(s) for plugins so even if you have both new packages installed and flash is working in your browser QtWebengine probably still fails to find it in the new location

    so you have two options

    1. locate and copy proper (32/64 bit) libraries to the expected location
    2. locate and use proper (32/64 bit) libraries in their new location - see http://doc.qt.io/qt-5/qtwebengine-features.html
      on how to load the Pepper Flash player from a specific location by using command line arguments: --ppapi-flash-path=./libpepflashplayer.so

    also take a look here:
    https://forum.qt.io/topic/65245/qt-5-6-webengine-problem-with-custom-flashplayer-locations
    https://forum.qt.io/topic/66187/cannot-load-pepper-flash-plugin-in-qtwebengine-with-qt5-6
    http://stackoverflow.com/questions/36689786/cannot-load-pepper-flash-plugin-in-qtwebengine-with-qt5-6



  • @ThatDud3 Thank you for your answer.

    Yes, pepper flash is running fine on Chrome.

    Previously I had found the location of the Chrome plugin (writing about:plugins in the address bar) and copied the lib to the default locations searched by QWebEngine. As I said, everything was working fine and suddenly I started receiving that error.

    Most of the times, the application doesn't even show the error but just stands there with the WebEngine widget completely blank.



  • That's why it is always a good idea to use local copy and never touch system wide locations...

    My guess (and it is just a wild guess) is that e.g. you copied v45 DLLs from browser's directory to system wide location which later on v 54 (or latest) overwrote (lately they repackaged and removed flash from browser so now it installs as a separate package or on first use in system wide location and overwrites your copy)
    .. so you end up with QtWebKit with Chrome 45 trying to use flash from Chrome 54 and failing sporadically - perhaps newer flash version is not backwards compatible with older browser.

    Check my previous on how to provide command line parameters to specify flash location (local to your app) but first find out the version of Chrome used by your QtWebEngine and download compatible flash player - e.g. start some demo and visit http://user-agent.me/
    then go and download exactly the same version from official website and extract just the DLLs
    Then just copy them in some local folder (usually where executable is) and change app paths;

    int main(int argc, char *argv[])
    {
        QDir d = QFileInfo(argv[0]).absoluteDir(); // copy to depl. folder
        QByteArray flashpath = QString("--ppapi-flash-path=%1/pepflashplayer.dll").arg(d.absolutePath()).toLatin1();
    // TODO: Change argv, argc here to append flash-path
    
        QApplication a(argc, my_argv);
    // ...
        return a.exec();
    }
    


  • @ThatDud3 Thank you for your help! :) And sorry for not posting earlier, I totally forgot about this thread...

    Problem is solved now. It turns out it was a problem of file permissions... I feel really dumb for not checking that in the first place! :P

    I must have copied the lib (using sudo) and forgot changing the permissions...


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.