RStudio 1.2 (zip version) fails to launch for "no Qt platform plugin could be initialized" on Win10 x64

Since I don't have administrative privilege on my business laptop, I cannot install RStudio with the installation file. So I have always been unzipping the zip file and it always worked well prior to 1.2.
This time I tried to unzip RStudio 1.2.1335.zip as usual. But the program fails to launch. It pops an error below:

This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix the problem.

Available platform plugins are: direct2d, minimal, offscreen, windows.
rstudio_fail

Apparently I cannot reinstall it. I tried to reset RStudio but still not working.
I don't have an idea about this issue. Searching around Google and StackOverflow did not give me any clue. Please do someone know how to fix this?
Thank you!

I wasn't able to reproduce -- the tarball version of RStudio runs without issue on my Windows 10 VM.

If you're willing, we could try to collect a bit more debug information.

First, you'll need to install the DebugView utility from Microsoft. It is a tool that allows you to view the debug output generated by Windows applications.

After DebugView has been downloaded, try running it. It should just present with a blank window for now.

Next, we'll launch RStudio from a command terminal with:

cd <path/to/RStudio/install>
set QT_DEBUG_PLUGINS=1
cd bin
rstudio.exe

After RStudio attempts to launch, you should see some debug output written to DebugView. (You may need to resize the Print column to see the full lines of output.)

For example, I see when loading the windows plugin:

I'd be curious to see what happens in your case.

EDIT TO NOTE: I am not using a zip version, but the latest install .exe

I'm having exactly the same issue trying to install for the first time today, the only difference being "direct2d" and "offscreen" don't show as plugin options

Here is the debug view output

[20620] QFactoryLoader::QFactoryLoader() checking directory path "C:/cots/win64_vs2013/plugins/platforms" ...
[20620] QFactoryLoader::QFactoryLoader() looking at "C:/cots/win64_vs2013/plugins/platforms/qwindows.dll"
[20620] Found metadata in lib C:/cots/win64_vs2013/plugins/platforms/qwindows.dll, metadata=
[20620] {
[20620]     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
[20620]     "MetaData": {
[20620]         "Keys": [
[20620]             "windows"
[20620]         ]
[20620]     },
[20620]     "className": "QWindowsIntegrationPlugin",
[20620]     "debug": false,
[20620]     "version": 329216
[20620] }
[20620] 
[20620] 
[20620] Got keys from plugin meta data ("windows")
[20620] QFactoryLoader::QFactoryLoader() looking at "C:/cots/win64_vs2013/plugins/platforms/qwindowsd.dll"
[20620] Found metadata in lib C:/cots/win64_vs2013/plugins/platforms/qwindowsd.dll, metadata=
[20620] {
[20620]     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
[20620]     "MetaData": {
[20620]         "Keys": [
[20620]             "windows"
[20620]         ]
[20620]     },
[20620]     "className": "QWindowsIntegrationPlugin",
[20620]     "debug": true,
[20620]     "version": 329216
[20620] }
[20620] 
[20620] 
[20620] "The plugin 'C:/cots/win64_vs2013/plugins/platforms/qwindowsd.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" 
[20620]          not a plugin
[20620] QFactoryLoader::QFactoryLoader() checking directory path "C:/Program Files/RStudio/bin/plugins/platforms" ...
[20620] QFactoryLoader::QFactoryLoader() looking at "C:/Program Files/RStudio/bin/plugins/platforms/qminimal.dll"
[20620] Found metadata in lib C:/Program Files/RStudio/bin/plugins/platforms/qminimal.dll, metadata=
[20620] {
[20620]     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
[20620]     "MetaData": {
[20620]         "Keys": [
[20620]             "minimal"
[20620]         ]
[20620]     },
[20620]     "archreq": 0,
[20620]     "className": "QMinimalIntegrationPlugin",
[20620]     "debug": false,
[20620]     "version": 330752
[20620] }
[20620] 
[20620] 
[20620] Got keys from plugin meta data ("minimal")
[20620] QFactoryLoader::QFactoryLoader() looking at "C:/Program Files/RStudio/bin/plugins/platforms/qwindows.dll"
[20620] Found metadata in lib C:/Program Files/RStudio/bin/plugins/platforms/qwindows.dll, metadata=
[20620] {
[20620]     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
[20620]     "MetaData": {
[20620]         "Keys": [
[20620]             "windows"
[20620]         ]
[20620]     },
[20620]     "archreq": 0,
[20620]     "className": "QWindowsIntegrationPlugin",
[20620]     "debug": false,
[20620]     "version": 330752
[20620] }
[20620] 
[20620] 
[20620] Got keys from plugin meta data ("windows")
[20620] QFactoryLoader::QFactoryLoader() checking directory path "C:/Program Files/RStudio/bin/platforms" ...
[20620] QFactoryLoader::QFactoryLoader() looking at "C:/Program Files/RStudio/bin/platforms/qwindows.dll"
[20620] Found metadata in lib C:/Program Files/RStudio/bin/platforms/qwindows.dll, metadata=
[20620] {
[20620]     "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
[20620]     "MetaData": {
[20620]         "Keys": [
[20620]             "windows"
[20620]         ]
[20620]     },
[20620]     "archreq": 0,
[20620]     "className": "QWindowsIntegrationPlugin",
[20620]     "debug": false,
[20620]     "version": 330752
[20620] }
[20620] 
[20620] 
[20620] Got keys from plugin meta data ("windows")
[20620] Cannot load library C:\cots\win64_vs2013\plugins\platforms\qwindows.dll: The specified procedure could not be found.
[20620] QLibraryPrivate::loadPlugin failed on "C:/cots/win64_vs2013/plugins/platforms/qwindows.dll" : "Cannot load library C:\\cots\\win64_vs2013\\plugins\\platforms\\qwindows.dll: The specified procedure could not be found."
[20620] qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.
[20620] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
[20620] 
[20620] Available platform plugins are: windows, minimal.
[20620] 

If I understand correctly, this line seems to imply that you likely have a separate, incompatible version of Qt (or its plugins) on the PATH, and RStudio is inadvertently picking those libraries up and attempting to use them. What is the output of Sys.getenv("PATH") in an R session for you?

If there is an entry like C:/cots/win64_vs2013/bin on the PATH in your case, it's possible removing that would fix the problem.

It might also be worth checking if the QT_PLUGIN_PATH environment variable has been set.

deleting
C:\cots\win64_vs2013\bin
C:\cots\win64_vs2013\plugins
from PATH did not fix the issue

QT_PLUGIN_PATH is currently set to C:\cots\win64_vs2013\plugins

setting it to C:\Program Files\RStudio\bin\plugins did fix the problem, though I worry it might create problems for other programs, particularly if I ever uninstall RStudio having forgotten all about this.

is there a more elegant solution?

Thanks for the help

Thank you both. I fixed it too by changing QT_PLUGIN_PATH.
However, it might possibly impact the previous settings (in my case, Anaconda). The QT_PLUGIN_PATH setting has been there for a long time, but prior to 1.2, I have never come across such an issue. Perhaps the dev team could consider a more compatible configuration for v1.2?

We could investigate whether this is possible. Would you mind filing this as a bug report at https://github.com/rstudio/rstudio/issues?

Sure. Please find it here.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.