Skip to content

Update NetWebView2Lib.au3 $NETWEBVIEW2_ERR__*#82

Merged
ioa747 merged 4 commits into
ioa747:mainfrom
mlipok:patch-1
Feb 11, 2026
Merged

Update NetWebView2Lib.au3 $NETWEBVIEW2_ERR__*#82
ioa747 merged 4 commits into
ioa747:mainfrom
mlipok:patch-1

Conversation

@mlipok
Copy link
Copy Markdown
Contributor

@mlipok mlipok commented Feb 11, 2026

Important

Thanks for your effort and interest 💛 in improving the project. It's very appreciated.

Description

Today I hit this kind of problem

+> ( NetWebView2Lib UDF : SLN=1211 ) :: [NetWebView2Lib:EVENT: OnMessageReceived]: GUI:0x000309CEERROR|INIT_FAILED|Próbowano załadować program w niepoprawnym formacie. (Wyjątek od HRESULT: 0x8007000B)

Translation An attempt was made to load a program with an invalid format. (Exception from HRESULT: 0x8007000B)

🔗 Linked GitHub Issues

none

Closes #<number>

📋 What is the current behavior?

_NetWebView2_Initialize() doesn't get out of the loop in case such error.

🚀 What is the new behavior?

better error checking


Type of changes

  • 🪲 Bugfix (change which fixes an issue)
  • ⭐ New Feature (change which adds functionality)
  • ⭐ New Example (this PR adds a new example)
  • 🔒 Security fix (change which improves security)
  • 🔮 Code style update (formatting, renaming)
  • 🔨 Refactoring (code optimization without functional change)
  • 📚 Documentation (updates to README or docs)
  • ⚙️ Build or CI related changes
  • 🧿 Other type

Breaking changes 🔥

  • Yes
  • No

How and where was this tested?

🖥️ Describe where you tested your changes

System:

  • Windows 11 (x64)
  • Windows 10 (x64)
  • Windows 10 (x86)
  • Windows Server ......

Context:

  • COM object NetJson.Parser
  • COM object NetWebView2.Manager - WebView2
  • COM object NetWebView2.Manager - Bridge
  • UDF - NetWebView2Lib.au3
  • Examples: ...
  • with ...

🔬 Describe how you tested your changes

  • Manually tested in system and context shown above
  • Ran automatic tests (unit tests, integration tests, etc.)
  • Other ways

Checklist

  • I have read and understood the available contributing guidelines.
  • I have ensured my code follows the available code conventions.
  • I have reviewed my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • I have added/updated necessary tests to cover the changes (if applicable).
  • I have checked for potential security implications.

Additional context

none

Screenshots

none

Note to reviewers

none

@mlipok mlipok marked this pull request as draft February 11, 2026 08:43
@mlipok
Copy link
Copy Markdown
Contributor Author

mlipok commented Feb 11, 2026

This part:
https://github.com/mlipok/NetWebView2Lib/blob/90ebca9d750d8b8bf02442aa6b094704108a3ebf/NetWebView2Lib.au3#L1137-L1148

won't parse fine this kind of messages:
ERROR|INIT_FAILED|Próbowano załadować program w niepoprawnym formacie. (Wyjątek od HRESULT: 0x8007000B)

as there is ERROR| in the front of the string

just try to use: 001-BasicDemo.au3
modifed by:

;~ #AutoIt3Wrapper_UseX64=y
#AutoIt3Wrapper_UseX64=n

@mlipok mlipok marked this pull request as ready for review February 11, 2026 11:05
@mlipok mlipok marked this pull request as draft February 11, 2026 11:06
@mlipok mlipok marked this pull request as ready for review February 11, 2026 13:39
@mlipok
Copy link
Copy Markdown
Contributor Author

mlipok commented Feb 11, 2026

The errors described do not affect the actual addition of the loop exit. Of course, this currently doesn't work. However, this isn't due to the added loop conditions, but rather to incorrect message parsing – a separate ISSUE is required for this.

So I think you can merge this part.

@ioa747
Copy link
Copy Markdown
Owner

ioa747 commented Feb 11, 2026

regarding the ERROR
if I connect this
Error 0x8007000B, which translates to "The file name or extension is too long"
with this
https://github.com/mlipok/NetWebView2Lib/blob/90ebca9d750d8b8bf02442aa6b094704108a3ebf/NetWebView2Lib.au3#L1137-L1148
and add the length of the storage path e.g.
C:\Users\Name\Documents\Projects\AutoIt\Tests...
plus the path of
Local $sProfileDirectory = @ScriptDir & "\NetWebView2Lib-UserDataFolder......"
then it probably comes to the conclusion

@ioa747 ioa747 merged commit fea0810 into ioa747:main Feb 11, 2026
@mlipok mlipok deleted the patch-1 branch February 11, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants