MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Uncaught Error: No parameters in result:

Open
#5,472 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Hello, we are making a WebView2 plugin for Rainmeter, a desktop customization tool that allows people to create skins (like widgets) for Windows.

Unfortunately we are having an issue:

When we call our API on Google and other sites, it works fine:
Screenshot 2025-12-17 173644

But when we try to do it on a site like YouTube it doesn't:
Screenshot 2025-12-17 173711

RainmeterAPI.Bang('[!Log "This is a Test"]');
VM6:1 Uncaught Error: No parameters in result: {
 "methodName": "",
 "parameters": null,
 "remoteObjectId": 0
}
    at RemoteMessenger.postSyncRequestMessage (<anonymous>:1:11642)
    at CallableTarget.getHostProperty (<anonymous>:1:26329)
    at CallableTarget._getAmbiguous (<anonymous>:1:15649)
    at Object.get (<anonymous>:1:17565)
    at <anonymous>:1:14
postSyncRequestMessage @ VM6:1
getHostProperty @ VM6:1
_getAmbiguous @ VM6:1
get @ VM6:1
(anonymous) @ VM402:1

When we check if the API is available by simply calling RainmeterAPI alone it does return the object, so the API is properly injected, but we are not getting responses.

Image

Any idea what could the issue be?

Here's the part where we add the host object:

    // Create and inject COM Host Object for Rainmeter API
    wil::com_ptr<HostObjectRmAPI> hostObject = 
        Microsoft::WRL::Make<HostObjectRmAPI>(this, g_typeLib);
    
    VARIANT variant = {};
    hostObject.query_to<IDispatch>(&variant.pdispVal);
    variant.vt = VT_DISPATCH;
    webView->AddHostObjectToScript(L"RainmeterAPI", &variant);
    variant.pdispVal->Release();
    
     webView->AddScriptToExecuteOnDocumentCreated(
        L"window.RainmeterAPI = chrome.webview.hostObjects.sync.RainmeterAPI",
        nullptr
    );

We are working on C++ (Win32), latest stable SDK (1.0.3650.58), we tried with older versions but the result was the same.

One tester noted that it worked fine on his machine which had an outdated WebView2 runtime version (100.0.1185.29), however, after he upgraded it, it started failing for him as well.

Thank you in advance.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure against YouTube with the reported WebView2 SDK 1.0.3650.58 and compare it with the older runtime 100.0.1185.29. Inspect the host-object setup using AddHostObjectToScript and the injected chrome.webview.hostObjects.sync.RainmeterAPI call; done means identifying why the API call returns no parameters or documenting a confirmed runtime limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop-dev, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.