Skip to content

[BUG]: ERROR Message parsing in __NetWebView2_Events__OnMessageReceived() function #84

@mlipok

Description

@mlipok

What happened?

I hit a problem which I try to resolve by the solution added by PR #82

This modification still not works because:

This part:

	#Region ; Message parsing
	Local $iSplitPos = StringSplit($sMsg, "|")
	Local $sCommand = $iSplitPos ? StringStripWS(StringLeft($sMsg, $iSplitPos - 1), 3) : $sMsg
	Local $sData = $iSplitPos ? StringTrimLeft($sMsg, $iSplitPos) : ""
	Local $aParts

	Local Static $sCommand_static = ''
	If Not @Compiled And $sCommand_static <> $sCommand Then ; show the log in non compiled - for DEV only
		ConsoleWrite('TEST IFNC: ' & $s_Prefix & ' @SLN=' & @ScriptLineNumber & ' ' & $sCommand & ' Data=' & (StringLen($sData) > 120 ? StringLeft($sData, 120) & "..." : $sData) & @CRLF) ; FOR DEV TESTING ONLY
		$sCommand_static = $sCommand
	EndIf
	#EndRegion ; Message parsing

dosen't take into account that there can be a leading ERROR| string in the $sMsg.

What did you expect to happen?

fix the parsing region.

Which steps did you take to reproduce the bug?

run the same procedure as in #83
Where the mentioned issue is about x32 support.
And this one is about message processing

Screenshots

none

Version

latest version

Older or unknown version?

No response

Do you want to work on this issue/fix?

Maybe

What system are you running?

  • Windows 11 (x64)
  • Windows 10 (x64)
  • Windows 10 (x86)
  • other Windows version
  • other operating system

Any additional context?

none

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinginvalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions