[osgeo4w-dev] [osgeo4w] #804: Could not load qgis_app.dll - QGIS LTR 3.28.11 OSGeo4W Installer
OSGeo4W
trac_osgeo4w at osgeo.org
Wed Sep 20 23:36:17 PDT 2023
#804: Could not load qgis_app.dll - QGIS LTR 3.28.11 OSGeo4W Installer
------------------------------------------------+--------------------------
Reporter: ascottwwf | Owner: osgeo4w-
| dev@…
Type: defect | Status: new
Priority: normal | Component: Installer
Version: 1.0 | Resolution:
Keywords: QGIS LTR OSGeo4W scripted installer |
------------------------------------------------+--------------------------
Description changed by jef:
Old description:
> I tried raising this issue with QGIS but I was pointed in your direction.
>
> **What is the bug or the crash?**
>
> After either a fresh install (or an upgrade install) of QGIS LTR using
> the OSGeo4W installer, the QGIS application will not start as it errors
> with:
>
> [[Image(ticket:804:QGIS Install Error.png)]]
>
> **Steps to reproduce the issue**
>
> We deploy QGIS LTR to a small number of users using Intune as our
> Application deployment method, this is deployed using a PowerShell script
> (originally sourced from:
> https://gist.github.com/Guts/6303dc5eb941eb24be3e27609cd46985), my
> slightly modified script is as follows:
>
> {{{#!sh
> "Begin: $ENV:PROCESSOR_ARCHITECTURE" >> "C:\Windows\Temp\Test.txt"
> If ($ENV:PROCESSOR_ARCHITEW6432 -eq "AMD64") {
> Try {
> &"$ENV:WINDIR\SysNative\WindowsPowershell\v1.0\PowerShell.exe"
> -File $PSCOMMANDPATH
> }
> Catch {
> Throw "Failed to start $PSCOMMANDPATH"
> }
> Exit
> }
>
> "End: $ENV:PROCESSOR_ARCHITECTURE" >> "C:\Windows\Temp\Test.txt"
> #Requires -RunAsAdministrator
>
> <#
> =========================================================================================
> Install-OSGeo4W_QGIS-LTR.ps1
> -----------------------------
> .Synopsis
> Download the OSGeo4W installer then download and install QGIS LTR
> (through the 'full' meta-package).
> .DESCRIPTION
> This script will:
> 1. change the current directory to the user downloads folder
> 2. download the OSGeo4W installer
> 3. launch it passing command-line parameters to INSTALL QGIS LTR
> Documentation reference:
> https://trac.osgeo.org/osgeo4w/wiki/CommandLine
> #>
>
> <#
> =========================================================================================
> Adrian Scott
> 7th December 2022
>
> Original file sourced from:
> https://gist.github.com/Guts/6303dc5eb941eb24be3e27609cd46985
>
> =========================================================================================
> #>
>
> Write-Host "=== Start installing / upgrading QGIS LTR..."
> -ForegroundColor Green
>
> # Save current working directory
> $starter_path = Get-Location
>
> # Move into the user download directory
> Set-Location -Path "$($env:USERPROFILE)\Downloads"
>
> # Set saved name of File to be downloaded
> $OutFile = "osgeo4w-setup.exe"
>
> # Download installer
> Write-Host " = Start downloading the OSGeo4W installer..."
> -ForegroundColor Yellow
> Invoke-WebRequest -Uri "https://download.osgeo.org/osgeo4w/v2/osgeo4w-
> setup.exe" -OutFile $OutFile
>
> # Download and install (same command to upgrade with clean up)
> Write-Host " = Start installing / upgrading QGIS LTR..." -ForegroundColor
> Yellow
> & .\$($OutFile) `
> --quiet-mode `
> --advanced `
> --arch x86_64 `
> --autoaccept `
> --delete-orphans `
> --local-package-dir "$($env:APPDATA)\OSGeo4W_v2-Packages" `
> --menu-name "QGIS LTR" `
> --no-desktop `
> --packages qgis-ltr-full `
> --root "$($env:ProgramFiles)\OSGeo4W_v2" `
> --site "https://www.norbit.de/osgeo4w/v2" `
> --site "https://download.osgeo.org/osgeo4w/v2" `
> --site "https://ftp.osuosl.org/pub/osgeo/download/osgeo4w/v2" `
> --upgrade-also `
> | out-null
>
> # Return to the initial directory
> Set-Location -Path $starter_path
> Write-Host "==== Work is done!" -ForegroundColor Green
> }}}
>
> So, up until the release of QGIS LTR version 3.28.9 (or 3.28.8), this
> script had worked fine, but since then we have been seeing this issue
>
> This issue occurs on both fresh installs and upgrade installs (this is
> similar to the earlier reported QGIS issue #49148
> (https://github.com/qgis/QGIS/issues/49148).
> We use the OSGeo4W installer to install (and/or upgrade) QGIS LTR
>
> From my basic understanding it appears that during the install, the path
> environment does not get updated (as it had previously), so when running
> the QGIS application the qgis_app.dll can not be found, hence the error
> message.
> I also note that on a new and upgraded install that the qgis-ltr-bin.env
> file does not exist so it is not possible to Check this file for correct
> environment paths.
> I have re-visited the command line syntax for the OSGeo4W installer
> (https://trac.osgeo.org/osgeo4w/wiki/CommandLine), to double check there
> is no changes to the syntax (or mistakes in my command), but all seems as
> it always has.
> FYI: All our devices run Windows 10 Enterprise (x64) version 22H2 with
> latest September (or August) 2023 Windows updates installed i.e. Build
> 10.0.19045.3348
>
> I suspect the installer is failing to complete at some point and not
> running the procedure that amends the environment path
New description:
I tried raising this [https://github.com/qgis/QGIS/issues/54678 issue with
QGIS] but I was pointed in your direction.
**What is the bug or the crash?**
After either a fresh install (or an upgrade install) of QGIS LTR using the
OSGeo4W installer, the QGIS application will not start as it errors with:
[[Image(ticket:804:QGIS Install Error.png)]]
**Steps to reproduce the issue**
We deploy QGIS LTR to a small number of users using Intune as our
Application deployment method, this is deployed using a PowerShell script
(originally sourced from:
https://gist.github.com/Guts/6303dc5eb941eb24be3e27609cd46985), my
slightly modified script is as follows:
{{{#!sh
"Begin: $ENV:PROCESSOR_ARCHITECTURE" >> "C:\Windows\Temp\Test.txt"
If ($ENV:PROCESSOR_ARCHITEW6432 -eq "AMD64") {
Try {
&"$ENV:WINDIR\SysNative\WindowsPowershell\v1.0\PowerShell.exe"
-File $PSCOMMANDPATH
}
Catch {
Throw "Failed to start $PSCOMMANDPATH"
}
Exit
}
"End: $ENV:PROCESSOR_ARCHITECTURE" >> "C:\Windows\Temp\Test.txt"
#Requires -RunAsAdministrator
<#
=========================================================================================
Install-OSGeo4W_QGIS-LTR.ps1
-----------------------------
.Synopsis
Download the OSGeo4W installer then download and install QGIS LTR
(through the 'full' meta-package).
.DESCRIPTION
This script will:
1. change the current directory to the user downloads folder
2. download the OSGeo4W installer
3. launch it passing command-line parameters to INSTALL QGIS LTR
Documentation reference:
https://trac.osgeo.org/osgeo4w/wiki/CommandLine
#>
<#
=========================================================================================
Adrian Scott
7th December 2022
Original file sourced from:
https://gist.github.com/Guts/6303dc5eb941eb24be3e27609cd46985
=========================================================================================
#>
Write-Host "=== Start installing / upgrading QGIS LTR..." -ForegroundColor
Green
# Save current working directory
$starter_path = Get-Location
# Move into the user download directory
Set-Location -Path "$($env:USERPROFILE)\Downloads"
# Set saved name of File to be downloaded
$OutFile = "osgeo4w-setup.exe"
# Download installer
Write-Host " = Start downloading the OSGeo4W installer..."
-ForegroundColor Yellow
Invoke-WebRequest -Uri "https://download.osgeo.org/osgeo4w/v2/osgeo4w-
setup.exe" -OutFile $OutFile
# Download and install (same command to upgrade with clean up)
Write-Host " = Start installing / upgrading QGIS LTR..." -ForegroundColor
Yellow
& .\$($OutFile) `
--quiet-mode `
--advanced `
--arch x86_64 `
--autoaccept `
--delete-orphans `
--local-package-dir "$($env:APPDATA)\OSGeo4W_v2-Packages" `
--menu-name "QGIS LTR" `
--no-desktop `
--packages qgis-ltr-full `
--root "$($env:ProgramFiles)\OSGeo4W_v2" `
--site "https://www.norbit.de/osgeo4w/v2" `
--site "https://download.osgeo.org/osgeo4w/v2" `
--site "https://ftp.osuosl.org/pub/osgeo/download/osgeo4w/v2" `
--upgrade-also `
| out-null
# Return to the initial directory
Set-Location -Path $starter_path
Write-Host "==== Work is done!" -ForegroundColor Green
}}}
So, up until the release of QGIS LTR version 3.28.9 (or 3.28.8), this
script had worked fine, but since then we have been seeing this issue
This issue occurs on both fresh installs and upgrade installs (this is
similar to the earlier reported [https://github.com/qgis/QGIS/issues/49148
QGIS issue #49148]).
We use the OSGeo4W installer to install (and/or upgrade) QGIS LTR
From my basic understanding it appears that during the install, the path
environment does not get updated (as it had previously), so when running
the QGIS application the qgis_app.dll can not be found, hence the error
message.
I also note that on a new and upgraded install that the qgis-ltr-bin.env
file does not exist so it is not possible to Check this file for correct
environment paths.
I have re-visited the [https://trac.osgeo.org/osgeo4w/wiki/CommandLine
command line syntax for the OSGeo4W installer], to double check there is
no changes to the syntax (or mistakes in my command), but all seems as it
always has.
FYI: All our devices run Windows 10 Enterprise (x64) version 22H2 with
latest September (or August) 2023 Windows updates installed i.e. Build
10.0.19045.3348
I suspect the installer is failing to complete at some point and not
running the procedure that amends the environment path
--
--
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/804#comment:5>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.
More information about the osgeo4w-dev
mailing list