I have a Framework 4.8 C# app that uses ClearScript to allow JavaScript to be used as an extension language. I am able to write plugins as DLLs and attach them at runtime, viz

JSE.Script.attach = (Func<string, bool>)Attach; ...         private static bool Attach(string dllPath, string name = "")         {             var status = false;             var htc = new HostTypeCollection();             try             {                 var assem = Assembly.Load(AssemblyName.GetAssemblyName(dllPath));                 htc.AddAssembly(assem);                 if (name.Length == 0)                 {                     name = assem.FullName.Split(',')[0];                 }                 JSE.AddHostObject(name, htc); //FIXME checkout the hosttypes                 Console.Error.WriteLine($"Attached {dllPath} as {name}");                 status = true;             }             catch (ReflectionTypeLoadException rtle)             {                 foreach (var item in rtle.LoaderExceptions)                 {                     Console.Error.WriteLine(item.Message);                     T.Fail(item.Message);                 }             }             catch (FileNotFoundException fnfe)             {                 Console.Error.WriteLine(fnfe.Message);                 T.Fail(fnfe.Message);             }             catch (Exception e)             {                 Console.Error.WriteLine(e.Message);                 T.Fail(e.Message);             }             return status;         } 

This permits my scripts to have lines like

attach(".\\Plugin_GoogleAds_Metrics.dll"); H = Plugin_GoogleAds_Metrics.GoogleAds_Metrics.Historical; H.EnableTrace("GAM"); ... 

I've made a public repo of the plugin for those interested.

What's not working in this situation is that when I try to execute the plugin's GetAccountInformation method, and execution reaches the GoogleAdsServiceClient googleAdsService = client.GetService(Services.V11.GoogleAdsService); line, an error is thrown complaining about Google.Protobuf, viz

Exception has been thrown by the target of an invocation.     at JScript global code (Script [23] [temp]:5:0) -> acc = H.GetAccountInformation(auths.Item1, 7273576109, true)    at Microsoft.ClearScript.ScriptEngine.ThrowScriptError(IScriptEngineException scriptError)    at Microsoft.ClearScript.Windows.WindowsScriptEngine.ThrowScriptError(Exception exception)    at Microsoft.ClearScript.Windows.WindowsScriptEngine.<>c__DisplayClass57_0`1.<ScriptInvoke>b__0()    at Microsoft.ClearScript.ScriptEngine.ScriptInvokeInternal[T](Func`1 func)    at Microsoft.ClearScript.ScriptEngine.ScriptInvoke[T](Func`1 func)    at Microsoft.ClearScript.Windows.WindowsScriptEngine.ScriptInvoke[T](Func`1 func)    at Microsoft.ClearScript.Windows.WindowsScriptEngine.Execute(UniqueDocumentInfo documentInfo, String code, Boolean evaluate)    at Microsoft.ClearScript.Windows.JScriptEngine.Execute(UniqueDocumentInfo documentInfo, String code, Boolean evaluate)    at Microsoft.ClearScript.ScriptEngine.Evaluate(UniqueDocumentInfo documentInfo, String code, Boolean marshalResult)    at Microsoft.ClearScript.ScriptEngine.Evaluate(DocumentInfo documentInfo, String code)    at Microsoft.ClearScript.ScriptEngine.Evaluate(String documentName, Boolean discard, String code)    at Microsoft.ClearScript.ScriptEngine.Evaluate(String documentName, String code)    at Microsoft.ClearScript.ScriptEngine.Evaluate(String code)    at RulesetRunner.Program.Run(JScriptEngine& jSE, String scriptText, Config cfg, Dictionary`2 settings) in C:\Users\bugma\Source\Repos\Present\BORR\RulesetRunner\RunManagementPartials.cs:line 72 Exception has been thrown by the target of an invocation. Exception has been thrown by the target of an invocation. Could not load file or assembly 'Google.Protobuf, Version=3.15.8.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604' or one of its dependencies. The system cannot find the file specified. 

So

  1. I am using the latest Google.Ads.GoogleAds library
  2. AutoGenerateBindingRedirects has been set to true in the csproj file
  3. Add-BindingRedirect has been executed in the context of the Plugin's project
  4. The Plugin_GoogleAds_Metrics.dll is in the same folder as the Google.Protobuf.dll

Where to from here?

I recently started using the new Whatsapp Cloud API. Unfortunately already the sample request in the first steps guide gives an error message. The request to the messages endpoint gives the following response:

{   "error": {     "message": "An unknown error occurred",     "type": "OAuthException",     "code": 1,     "error_subcode": 2593006,     "is_transient": false,     "error_user_title": "Account Not Exist",     "error_user_msg": "Account does not exist in Facebook Hosted API, please use /register API to create an account first.",     "fbtrace_id": "AX1Thf9OPBhmj7NlDV6-5IA "   } } 

I am still using the Test WhatsApp Business Account with a Test Number. When calling the register endpoint I get You can’t complete the setup process because your business doesn’t meet WhatsApp’s policy requirements. If you think this is incorrect, reach out to Meta Business Suite support for help.

Does anyone have an idea, what the problem is?

Thank you in advance,

Sören

I'm trying to get WhatsApp's Cloud API working. I managed to set up Meta Business Account and configure a WhatsApp app. Then I configured a webhook and subscribed to messages event (see the following screenshot).

I then managed to send a message via the API using the following request:

curl -i -X POST `   https://graph.facebook.com/v13.0/103690452403982/messages `   -H 'Authorization: Bearer MY_TOKEN' `   -H 'Content-Type: application/json' `   -d '{ \"messaging_product\": \"whatsapp\", \"to\": \"MY_NUMBER\", \"type\": \"template\", \"template\": { \"name\": \"hello_world\", \"language\": { \"code\": \"en_US\" } } }' 

I received the message and it came through the webhook as well. If I reply to that message, it comes through the webhook too.

The problem

However, when I send a message to the associated number from a different WhatsApp number (not via the API) it is received but the webhook is not called.

I suspect some incorrect configuration on my side. When I text the number from a different phone, the chat has a notice about E2E encryption - something which is not present in a chat window of the API-sent message. I assume that E2E-encrypted messages cannot be passed to the webhook because only the recipients should be able to decrypt the message.

Any ideas what I might be missing?

Thank you in advance

I am trying to use Data fusion to get detail report of my Google ads MCC level. I did the following

  1. Have a test developer account token on my MCC
  2. Generated the refresh token
  3. Generated the client ID & client secret
  4. Authorised Google ads API to access my account

I added all the needed credentials in the properties section but It gives me the following error Exception while downloading report definition :null

I think the problem is with the fields as I tried to add fields such as Clicks Ad_Name & Date but still getting the same error even after changing the fields over and over again. Any idea why this is happening?