Bug report #18231

DB Manager - PostgreSQL and Converted Config Seg error

Added by Andre Jesus over 2 years ago. Updated over 1 year ago.

Status:Closed
Priority:High
Assignee:-
Category:DB Manager
Affected QGIS version:3.0.0 Regression?:Yes
Operating System:Windows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:26122

Description

DB Manager cannot access PostgreSQl resources if it's configured with Converted Config Seg option.
When trying to expand schemas it returns error

Error message:

Erro Python: Um erro ocorreu enquanto executava o código Python: Consulte o registro de mensagens (Erro Python) para mais detalhes.

Python error:

Um erro ocorreu enquanto executava o código Python: 

PermissionError: [WinError 5] Access is denied: 'C:/Users/arjesus/AppData/Local/Temp/tmp_basic_{147fc7e0-e22a-4797-b33f-8b054b7af54b}.pem' 
Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_model.py", line 441, in rowCount
self._refreshIndex(parent, True)
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_model.py", line 490, in _refreshIndex
if item.populate():
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_model.py", line 167, in populate
if not connection.connect():
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 103, in connect
return self.connectToUri(uri)
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\plugin.py", line 109, in connectToUri
self.db = self.databasesFactory(self, uri)
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 70, in databasesFactory
return PGDatabase(connection, uri)
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 111, in __init__
Database.__init__(self, connection, uri)
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\plugin.py", line 218, in __init__
self.connector = self.connectorsFactory(uri)
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\plugin.py", line 114, in connectorsFactory
return PostGisDBConnector(uri)
File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins\db_manager\db_plugins\postgis\connector.py", line 128, in __init__
os.remove(sslCAFile)
PermissionError: [WinError 5] Access is denied: 'C:/Users/arjesus/AppData/Local/Temp/tmp_basic_{147fc7e0-e22a-4797-b33f-8b054b7af54b}.pem'

Versão do Python: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] 
Versão do QGIS: 3.0.0-Girona Girona, 001c80b0c3 

Caminho do Python:
C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python
C:/Users/arjesus/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/arjesus/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python/plugins
C:\Program Files\QGIS 3.0\bin\python36.zip
C:\PROGRA~1\QGIS3~1.0\apps\Python36\DLLs
C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib
C:\Program Files\QGIS 3.0\bin
C:\PROGRA~1\QGIS3~1.0\apps\Python36
C:\PROGRA~1\QGIS3~1.0\apps\Python36\lib\site-packages
C:/Users/arjesus/AppData/Roaming/QGIS/QGIS3\profiles\default/python

Access is denied: 'C:/Users/arjesus/AppData/Local/Temp/tmp_basic_{147fc7e0-e22a-4797-b33f-8b054b7af54b}.pem' 

File permission is ok for my user, i don't know why it returns denied access.

Using default basic authentication works.

Associated revisions

Revision 878ab41a
Added by Luigi Pirelli about 2 years ago

Set permission to certs to allow correct removing on win

History

#1 Updated by Antoine Rivière about 2 years ago

Bug confirmed for me with authentication (type : basic) :

PermissionError: [WinError 5] Accès refusé: 'C:/Users/ariviere/AppData/Local/Temp/tmp_basic_{243adae7-65cd-409a-bf53-4e16acfd5b9a}.pem'

The same authentication configuration works as expected in Browser panel on QGIS 3.0.0
It works on QGIS 2.18
It's a regression.

#2 Updated by Giovanni Manghi about 2 years ago

  • Regression? changed from No to Yes
  • Priority changed from Normal to High

#3 Updated by Jürgen Fischer over 1 year ago

  • Description updated (diff)

#4 Updated by Jürgen Fischer over 1 year ago

fixed in 878ab41ad31

#5 Updated by Jürgen Fischer over 1 year ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Also available in: Atom PDF