Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-102133

Qt6 QWebEngineProfile CachePath can't created

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 6.0.4, 6.2.3, 6.2.4, 6.3.0 RC
    • WebEngine
    • None
    • I am on Windows 11, I use Microsoft Visual Studio 2019 and CLion for dev my soft
    • Windows

    Description

      My software can't be save cookies and cache
      to debug my software i do this :
      ```qt
      qDebug() <<"before";
      qDebug() << "CachePath:" << QWebEngineProfile::defaultProfile()->cachePath();
      qDebug() << "StoragePath:" << QWebEngineProfile::defaultProfile()->persistentStoragePath();
      qDebug() << "isOffTheRecord:" << QWebEngineProfile::defaultProfile()->isOffTheRecord();

      QWebEngineProfile::defaultProfile()->setPersistentCookiesPolicy(QWebEngineProfile::ForcePersistentCookies);
      QWebEngineProfile* defaultProfile = QWebEngineProfile::defaultProfile();

      defaultProfile->setHttpCacheType(QWebEngineProfile::DiskHttpCache);
      defaultProfile->setPersistentCookiesPolicy(QWebEngineProfile::ForcePersistentCookies);

      defaultProfile->setCachePath(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
      defaultProfile->setPersistentStoragePath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation));

      qDebug() << "after";
      qDebug() << "CachePath:" << QWebEngineProfile::defaultProfile()->cachePath();
      qDebug() << "StoragePath:" << QWebEngineProfile::defaultProfile()->persistentStoragePath();
      qDebug() << "isOffTheRecord:" << QWebEngineProfile::defaultProfile()->isOffTheRecord();
      ```
      And result is :
      ```qt
      before
      qt.webenginecontext:

      GLImplementation: desktop
      Surface Type: OpenGL
      Surface Profile: CompatibilityProfile
      Surface Version: 4.6
      Using Default SG Backend: yes
      Using Software Dynamic GL: no
      Using Angle: no

      Init Parameters:

      • application-name FranceTV
      • blink-settings forceDarkModeEnabled=true,darkModeInversionAlgorithm=4
      • browser-subprocess-path I:\FranceTV\cmake-build-release\QtWebEngineProcess.exe
      • create-default-gl-context
      • disable-es3-gl-context
      • disable-features DnsOverHttpsUpgrade,ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,
        PictureInPicture
      • disable-speech-api
      • enable-features NetworkServiceInProcess,TracingServiceInProcess
      • enable-threaded-compositing
      • in-process-gpu
      • proprietary-codecs
      • use-gl desktop

      CachePath: ""
      StoragePath: "C:/Users/paulw/AppData/Roaming/Paul_WOISARD/FranceTV/QtWebEngine/OffTheRecord"
      isOffTheRecord: true
      after
      CachePath: ""
      StoragePath: "C:/Users/paulw/AppData/Local/Paul_WOISARD/FranceTV"
      isOffTheRecord: true
      ```

      I can see that cache path is never created

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            paulwaffle Paul WOISARD
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes