java-cef icon indicating copy to clipboard operation
java-cef copied to clipboard

Custom scheme registration fails

Open LeadAssimilator opened this issue 2 years ago • 0 comments

Description Custom registered schemes never get registered in the subprocesses causing them to not work.

To Reproduce

  1. Register a custom scheme.
  2. Try to nav to a url with the custom scheme.
  3. Observe custom scheme load failed and VALIDATION_ERROR_DESERIALIZATION_FAILED errors in log.

Expected behavior Custom schemes should work.

Versions:

  • OS: Ubuntu 22.0.4.1 LTS [via wsl2]
  • Java Version: Microsoft OpenJDK 17.0.3+7-LTS
  • JCEF Version: 87476e9
  • CEF Version: 110.0.25

Additional context JCEF is erroneously constructing temp file names used for the scheme registration that the subprocess helper needs. There is a bad assumption that CefGetPath will return a temp path with a trailing slash in util::GetTempFileName.

Workarounds

  • export TMPDIR=/tmp/
  • sudo chmod o+w / (dont do this)

Proposed Fix Check for and insert a trailing slash as needed or use std::filesystem::path to avoid these kinds of errors.

LeadAssimilator avatar Apr 23 '23 08:04 LeadAssimilator