Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not install app on win7; but win10 is ok #2882

Closed
charmfocus opened this issue Nov 13, 2021 · 14 comments
Closed

Can not install app on win7; but win10 is ok #2882

charmfocus opened this issue Nov 13, 2021 · 14 comments

Comments

@charmfocus
Copy link

image

tauri.conf.json

"wix":{
          "template": "./main.wxs",
          "skipWebviewInstall": false
        }

main.wxs

        {{#if install_webview}}
        <!-- WebView2 -->
        <Property Id="WVRTINSTALLED">
            <RegistrySearch Id="WVRTInstalled" Root="HKLM" Key="SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}" Name="pv" Type="raw" Win64="no"/>
        </Property>
        <!-- <CustomAction Id='DownloadAndInvokeBootstrapper' Directory="INSTALLDIR" Execute="deferred" ExeCommand='powershell.exe -NoProfile -windowstyle hidden Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" ; &amp; $env:TEMP\MicrosoftEdgeWebview2Setup.exe /install' Return='check'/> -->
        <CustomAction Impersonate='no' Id='DownloadAndInvokeBootstrapper' Directory="INSTALLDIR" Execute="deferred" ExeCommand='powershell.exe -NoProfile -windowstyle hidden Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" ; Start-Process -FilePath "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" -ArgumentList (&apos;/silent&apos;, &apos;/install&apos;) -Wait' Return='check'/>
        <InstallExecuteSequence>
            <Custom Action='DownloadAndInvokeBootstrapper' Before='InstallFinalize'>
                <![CDATA[NOT(REMOVE OR WVRTINSTALLED)]]>
            </Custom>
        </InstallExecuteSequence>
        {{/if}}
@FabianLars
Copy link
Member

Hmm, so that error window most likely means that the webview2 installation failed.
No idea if it was tauris install script or yours (main.wxs) as it should try to run both scripts (because skipWebviewInstall is disabled).
But i also have no idea about wix, just trying to give you a hint to where it fails :/

@lucasfernog
Copy link
Member

Seems like we need an alternative for Windows 7 since powershell isn't available.

@lucasfernog
Copy link
Member

@lucasfernog
Copy link
Member

Can you see if this installs correctly on Windows 7? It's an alternative approach using the Tauri API example. @charmfocus
installer.zip

@FabianLars
Copy link
Member

FabianLars commented Nov 14, 2021

Maybe my win7 VM is broken again (it shouldn't as it's a somewhat fresh install), but i get:
"Setup Failed
One or more issues caused the setup to fail. Please fix the issues and then retry setup. For more information see the log file
0x80072f7d - Unknown Error"

This is the same issue some people had in discord with the powershell script, where it didn't use TLS(1.2). for example the discussion around this message: https://discord.com/channels/616186924390023171/731495064508825731/882219386600034376

So i had to go to Internet Options -> Advanced and check the Use TLS 1.2 option.
After that the installation works fine...

@lucasfernog
Copy link
Member

Well at least I know I can finish this approach and PR it.

@charmfocus
Copy link
Author

Can you see if this installs correctly on Windows 7? It's an alternative approach using the Tauri API example. @charmfocus installer.zip

Turn off the safety anti-virus sofware and install successfully

@lucasfernog
Copy link
Member

Tauri API_0.1.0_x64.exe.zip

What about this one? This installer doesn't download the MicrosoftEdgeWebview2Setup.exe file, but has it embedded.

@charmfocus
Copy link
Author

charmfocus commented Nov 14, 2021

Tauri API_0.1.0_x64.exe.zip

What about this one? This installer doesn't download the MicrosoftEdgeWebview2Setup.exe file, but has it embedded.

image
When the antivirus software is not closed, the installation fails Access denied

The log:

[1130:031C][2021-11-15T01:13:09]i001: Burn v3.11.2.4516, Windows v6.1 (Build 7601: Service Pack 1), path: C:\Windows\Temp\{040D03D6-D4F2-4044-B8F7-222AA3E7337F}\.cr\Tauri API_0.1.0_x64.exe
[1130:031C][2021-11-15T01:13:09]i009: Command Line: '"-burn.clean.room=C:\Users\Administrator\AppData\Local\Temp\360zip$Temp\360$10\Tauri API_0.1.0_x64.exe" -burn.filehandle.attached=200 -burn.filehandle.self=208'
[1130:031C][2021-11-15T01:13:09]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\Administrator\AppData\Local\Temp\360zip$Temp\360$10\Tauri API_0.1.0_x64.exe'
[1130:031C][2021-11-15T01:13:09]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Users\Administrator\AppData\Local\Temp\360zip$Temp\360$10\'
[1130:031C][2021-11-15T01:13:09]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\Tauri_API_20211115011309.log'
[1130:031C][2021-11-15T01:13:09]w055: Could not load or read state file: C:\ProgramData\Package Cache\{62b0971d-cd7f-4a97-bee9-dc5ed29b2884}\\state.rsm, error: 0x80070002.
[1130:031C][2021-11-15T01:13:09]i000: Setting string variable 'WixBundleName' to value 'Tauri API'
[1130:031C][2021-11-15T01:13:09]i000: Setting string variable 'WixBundleManufacturer' to value 'com.tauri.api'
[1130:0B6C][2021-11-15T01:13:09]i000: Setting numeric variable 'WixStdBALanguageId' to value 1033
[1130:0B6C][2021-11-15T01:13:09]i000: Setting version variable 'WixBundleFileVersion' to value '0.1.0.0'
[1130:031C][2021-11-15T01:13:09]i100: Detect begin, 2 packages
[1130:031C][2021-11-15T01:13:09]i000: Registry key not found. Key = 'SOFTWARE\Microsoft\EdgeUpdate\Clients\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}'
[1130:031C][2021-11-15T01:13:09]i101: Detected package: InvokeBootstrapper, state: Absent, cached: None
[1130:031C][2021-11-15T01:13:09]i101: Detected package: Msi, state: Absent, cached: None
[1130:031C][2021-11-15T01:13:09]i199: Detect complete, result: 0x0
[1130:0B6C][2021-11-15T01:13:13]i000: Setting numeric variable 'EulaAcceptCheckbox' to value 1
[1130:031C][2021-11-15T01:13:13]i200: Plan begin, 2 packages, action: Install
[1130:031C][2021-11-15T01:13:13]i052: Condition 'NOT (REMOVE OR WVRTInstalled)' evaluates to true.
[1130:031C][2021-11-15T01:13:13]w321: Skipping dependency registration on package with no dependency providers: InvokeBootstrapper
[1130:031C][2021-11-15T01:13:13]i000: Setting string variable 'WixBundleLog_InvokeBootstrapper' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\Tauri_API_20211115011309_000_InvokeBootstrapper.log'
[1130:031C][2021-11-15T01:13:13]i000: Setting string variable 'WixBundleRollbackLog_InvokeBootstrapper' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\Tauri_API_20211115011309_000_InvokeBootstrapper_rollback.log'
[1130:031C][2021-11-15T01:13:13]i000: Setting string variable 'WixBundleRollbackLog_Msi' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\Tauri_API_20211115011309_001_Msi_rollback.log'
[1130:031C][2021-11-15T01:13:13]i000: Setting string variable 'WixBundleLog_Msi' to value 'C:\Users\ADMINI~1\AppData\Local\Temp\Tauri_API_20211115011309_001_Msi.log'
[1130:031C][2021-11-15T01:13:13]i201: Planned package: InvokeBootstrapper, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: Yes, dependency: None
[1130:031C][2021-11-15T01:13:13]i201: Planned package: Msi, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[1130:031C][2021-11-15T01:13:13]i299: Plan complete, result: 0x0
[1130:031C][2021-11-15T01:13:13]i300: Apply begin
[1130:031C][2021-11-15T01:13:13]i010: Launching elevated engine process.
[1130:031C][2021-11-15T01:13:13]i011: Launched elevated engine process.
[1130:031C][2021-11-15T01:13:13]i012: Connected to elevated engine.
[0B9C:10A8][2021-11-15T01:13:13]i358: Pausing automatic updates.
[0B9C:10A8][2021-11-15T01:13:13]i359: Paused automatic updates.
[0B9C:10A8][2021-11-15T01:13:13]i360: Creating a system restore point.
[0B9C:10A8][2021-11-15T01:13:18]i361: Created a system restore point.
[0B9C:10A8][2021-11-15T01:13:18]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{62b0971d-cd7f-4a97-bee9-dc5ed29b2884}, options: 0x4, disable resume: No
[0B9C:10A8][2021-11-15T01:13:18]i320: Registering bundle dependency provider: {62b0971d-cd7f-4a97-bee9-dc5ed29b2884}, version: 0.1.0.0
[0B9C:10A8][2021-11-15T01:13:18]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{62b0971d-cd7f-4a97-bee9-dc5ed29b2884}, resume: Active, restart initiated: No, disable resume: No
[0B9C:10A8][2021-11-15T01:13:18]e000: Error 0x80070005: Failed to write run key value.
[0B9C:10A8][2021-11-15T01:13:18]e000: Error 0x80070005: Failed to update resume mode.
[0B9C:10A8][2021-11-15T01:13:18]e000: Error 0x80070005: Failed to begin registration session.
[1130:031C][2021-11-15T01:13:18]e000: Error 0x80070005: Failed to begin registration session in per-machine process.
[1130:031C][2021-11-15T01:13:18]e000: Error 0x80070005: Failed to register bundle.
[1130:031C][2021-11-15T01:13:18]i399: Apply complete, result: 0x80070005, restart: None, ba requested restart:  No

@FabianLars
Copy link
Member

FabianLars commented Nov 14, 2021

For what it's worth, this one works without enabling TLS1.2 (which seems to be disabled by default pre-win10).
The app itself still crashes tho. Kinda unrelated to this gh issue, but the error is:

thread 'main' panicked at 'error while building tauri application:
Runtime<CreateWebview<WebView2Error<WindowsError<Error < code: 0x80070057, message: "Wrong Parameter.", win32_error: 87 >>>>>',
src\main.rs:200:6

edit: forgot to add it here, but the crash was transparency related, sorry bout that.

@lucasfernog
Copy link
Member

I have no idea what's going on with the antivirus and the webview installer.

@lucasfernog
Copy link
Member

@xuchaoqian
Copy link
Contributor

Met the same problem here:

image

@calvinludwig
Copy link

Updating the related #4461 issue.
After manually installing the Microsoft Edge WebView2 Runtime, my installer worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants