Git Product home page Git Product logo

thunder's People

Contributors

404ag avatar albertd avatar anjalirajan avatar aswaunni avatar bramoosterhuis avatar damian-danylko avatar gladish avatar goruklu avatar haseenasainul avatar lukiwa avatar mfransen69 avatar mikolaj-staworzynski-red avatar mipo57 avatar modeveci avatar mrcomcast123 avatar msieben avatar pawel-stanek-ml avatar petegriffin avatar pwielders avatar rjpdasilva avatar s-rapolu avatar scthunderbolt avatar sebaszm avatar skumarmetro avatar sramani-metro avatar svdmaar avatar veithmetro avatar vinodsathyaseelan avatar wiswis15 avatar woutermeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

thunder's Issues

align, to_string and strtof functions

align, to_string and strtof functions aren't available in certain toolchains with an older version of gcc and this causes thunder build failure

Missing "#include <stdio.h>" in Source/ocdm/open_cdm.h

Doesn't boot WebKitBrowser after plugin loading

I'm trying to boot a WebKit browser using buildroot and the associated repos.

However for some reason webkit is not starting:

/usr/bin/WPEFramework /etc/WPEFramework/config.json
[       1605 us] Binder: [0.0.0.0:80]
[       2190 us] WPEFramework
[       2231 us] Starting time: Thu, 01 Jan 1970 00:03:16 GMT
[       2241 us] Process Id:    221
[       3135 us] SystemId:      WPEuCfrdiBH
[       3151 us] Tree ref:      cf9510290f36ed56e25b3dd6f4e4c0f5d7360e11
[       3161 us] Build ref:     443baad1938b99d03eb836b3af48bd2e6293288e
[       3170 us] Version:       1.0.
[       3178 us] Traces:        /etc/WPEFramework/config.json
[       3187 us] Forcing the network to IPv4 only.
[       4436 us] Interface [lo], fully functional
[      34084 us] WPEFramework actively listening.
[      34290 us] EVENT: Security
[      34833 us] EVENT: Identifier: WPEuCfrdiBH
[      34846 us] EVENT: Architecture: armv7l
[      34855 us] EVENT: Chipset:  BCM2835
[      34863 us] EVENT: FirmwareVersion: 4.9.80
[      34904 us] EVENT: Provisioning
[      34926 us] EVENT: Decryption
[      34935 us] EVENT: Streaming
[      34957 us] EVENT: Bluetooth
[      34991 us] Activated plugin [Controller]:[Controller]
[      35186 us] Activating plugin [Compositor]:[Compositor]
[      41543 us] EVENT: Platform
[      41645 us] EVENT: Graphics
[      41691 us] Activated plugin [Compositor]:[Compositor]
[      41766 us] Activating plugin [Controller]:[Controller]
[      41780 us] Activation of plugin [DHCPServer]:[DHCPServer] delayed, autostart is false
[      41792 us] Activating plugin [DisplayInfo]:[DisplayInfo]
[      73008 us] Activated plugin [DisplayInfo]:[DisplayInfo]
[      73114 us] Activating plugin [Launcher]:[Launcher]
[      75795 us] Activation of plugin [Launcher]:[Launcher], failed. Error [Command is not set]
[      75929 us] Activating plugin [NetworkControl]:[NetworkControl]
[      81956 us] Adapter [eth0] not available or in the wrong state.
[      82400 us] Adapter [wlan0] not available or in the wrong state.
[      83679 us] Activated plugin [NetworkControl]:[NetworkControl]
[      83761 us] Activating plugin [PlayerInfo]:[PlayerInfo]
[     108922 us] Activated plugin [PlayerInfo]:[PlayerInfo]
[     109027 us] Activating plugin [RemoteControl]:[RemoteControl]
[     117769 us] Activated plugin [RemoteControl]:[RemoteControl]
[     117860 us] Activating plugin [Snapshot]:[Snapshot]
[     119984 us] Activated plugin [Snapshot]:[Snapshot]
[     120082 us] Activating plugin [TimeSync]:[TimeSync]
[     123661 us] Activation of plugin [TimeSync]:[TimeSync], postponed, preconditions have not been met, yet.
[     123703 us] Activating plugin [WebServer]:[WebServer]
[     126877 us] Activation of plugin [WebServer]:[WebServer], postponed, preconditions have not been met, yet.
[     126919 us] Activating plugin [WifiControl]:[WifiControl]
[     234945 us] Activated plugin [WifiControl]:[WifiControl]

And then nothing else.
The config file looks like:

{
 "plugins":[
  {
   "callsign":"Controller",
   "configuration":{
    "subsystems":[
     "Internet",
     "Location",
     "Time",
     "Platform",
     "Graphics",
     "Network",
     "WebSource"
    ],
    "resumes":[
     "WebKitBrowser",
     "WebServer"
    ]
   }
  }
 ],
 "tracing":[
  {
   "category":"Startup",
   "module":"SysLog",
   "enabled":true
  },
  {
   "category":"Shutdown",
   "module":"SysLog",
   "enabled":true
  },
  {
   "category":"Notification",
   "module":"SysLog",
   "enabled":true
  },
  {
   "category":"Fatal",
   "enabled":true
  }
 ],
 "version":"1.0.",
 "port":80,
 "binding":"0.0.0.0",
 "ipv6":false,
 "idletime":180,
 "persistentpath":"/root",
 "volatilepath":"/tmp",
 "datapath":"/usr/share/WPEFramework",
 "systempath":"/usr/lib/wpeframework/plugins",
 "proxystubpath":"/usr/lib/wpeframework/proxystubs",
 "postmortempath":"/opt/minidumps",
 "redirect":"/Service/Controller/UI",
 "communicator":null,
 "process":{
  "umask":null,
  "group":null,
  "priority":0,
  "policy":"OTHER",
  "oomadjust":null,
  "stacksize":0
 },
 "exitreasons":[
  "Failure",
  "MemoryExceeded",
  "WatchdogExpired"
 ]
}

Mostly I'm trying to get some syslog out of the system

Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[Config.h:827]: Startup: Binder: [0.0.0.0:80]
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginHost.cpp:479]: Startup: WPEFramework
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginHost.cpp:480]: Startup: Starting time: Thu, 01 Jan 1970 00:00:06 GMT
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginHost.cpp:481]: Startup: Process Id:    148
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginHost.cpp:482]: Startup: SystemId:      WPEuCfrdiBH
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginHost.cpp:483]: Startup: Tree ref:      cf9510290f36ed56e25b3dd6f4e4c0f5d7360e11
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginHost.cpp:484]: Startup: Build ref:     443baad1938b99d03eb836b3af48bd2e6293288e
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginHost.cpp:485]: Startup: Version:       1.0.
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginHost.cpp:486]: Startup: Traces:        /etc/WPEFramework/config.json
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginHost.cpp:490]: Startup: Forcing the network to IPv4 only.
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginHost.cpp:295]: Startup: Interface [lo], fully functional
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginHost.cpp:505]: Startup: WPEFramework actively listening.
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[SystemInfo.h:607]: Startup: EVENT: Security
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[SystemInfo.h:373]: Startup: EVENT: Identifier: WPEuCfrdiBH
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[SystemInfo.h:374]: Startup: EVENT: Architecture: armv7l
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[SystemInfo.h:375]: Startup: EVENT: Chipset:  BCM2835
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[SystemInfo.h:376]: Startup: EVENT: FirmwareVersion: 4.9.80
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[SystemInfo.h:518]: Startup: EVENT: Provisioning
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[SystemInfo.h:528]: Startup: EVENT: Decryption
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[SystemInfo.h:558]: Startup: EVENT: Streaming
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[SystemInfo.h:568]: Startup: EVENT: Bluetooth
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginServer.cpp:393]: Startup: Activated plugin [Controller]:[Controller]
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginServer.cpp:826]: Startup: Activating plugin [Compositor]:[Compositor]
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[SystemInfo.h:320]: Startup: EVENT: Platform
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[SystemInfo.h:538]: Startup: EVENT: Graphics
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginServer.cpp:393]: Startup: Activated plugin [Compositor]:[Compositor]
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginServer.cpp:826]: Startup: Activating plugin [Controller]:[Controller]
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginServer.cpp:830]: Startup: Activation of plugin [DHCPServer]:[DHCPServer] delayed, autostart is false
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginServer.cpp:826]: Startup: Activating plugin [DisplayInfo]:[DisplayInfo]
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginServer.cpp:393]: Startup: Activated plugin [DisplayInfo]:[DisplayInfo]
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginServer.cpp:826]: Startup: Activating plugin [NetworkControl]:[NetworkControl]
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[NetworkControl.cpp:647]: Startup: DNS functionality updated [/etc/resolv.conf]
Jan  1 00:00:06 buildroot user.notice kernel: random: crng init done
Jan  1 00:00:06 buildroot user.info kernel: IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginServer.cpp:393]: Startup: Activated plugin [NetworkControl]:[NetworkControl]
Jan  1 00:00:06 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:06 ]:[PluginServer.cpp:826]: Startup: Activating plugin [PlayerInfo]:[PlayerInfo]
Jan  1 00:00:06 buildroot user.info kernel: brcmfmac: power management disabled
Jan  1 00:00:06 buildroot user.info kernel: IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Jan  1 00:00:07 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:07 ]:[PluginServer.cpp:393]: Startup: Activated plugin [PlayerInfo]:[PlayerInfo]
Jan  1 00:00:07 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:07 ]:[PluginServer.cpp:826]: Startup: Activating plugin [RemoteControl]:[RemoteControl]
Jan  1 00:00:07 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:07 ]:[PluginServer.cpp:393]: Startup: Activated plugin [RemoteControl]:[RemoteControl]
Jan  1 00:00:07 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:07 ]:[PluginServer.cpp:826]: Startup: Activating plugin [Snapshot]:[Snapshot]
Jan  1 00:00:07 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:07 ]:[PluginServer.cpp:393]: Startup: Activated plugin [Snapshot]:[Snapshot]
Jan  1 00:00:07 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:07 ]:[PluginServer.cpp:826]: Startup: Activating plugin [TimeSync]:[TimeSync]
Jan  1 00:00:07 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:07 ]:[PluginServer.cpp:331]: Startup: Activation of plugin [TimeSync]:[TimeSync], postponed, preconditions have not been met, yet.
Jan  1 00:00:07 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:07 ]:[PluginServer.cpp:826]: Startup: Activating plugin [WebServer]:[WebServer]
Jan  1 00:00:07 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:07 ]:[PluginServer.cpp:331]: Startup: Activation of plugin [WebServer]:[WebServer], postponed, preconditions have not been met, yet.
Jan  1 00:00:07 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:07 ]:[PluginServer.cpp:826]: Startup: Activating plugin [WifiControl]:[WifiControl]
Jan  1 00:00:07 buildroot user.notice /usr/bin/WPEFramework[148]: [Thu, 01 Jan 1970 00:00:07 ]:[PluginServer.cpp:393]: Startup: Activated plugin [WifiControl]:[WifiControl]
Jan  1 00:00:26 buildroot auth.info login[155]: root login on 'console'

But it is also not informative.
Do I need to get Wifi and PluginServer to work before Webkit can start ?
I have access to all the commands, to list the plugins, the channels, etc... so I'm assuming somehow it's booted. But I was expecting Webkit to start as well... :(

Unit tests broken on x86_64 gcc 9.3

I wasn't sure what the right approach here is. Capturing the locals creates other problems. Possibly mimic how it's done in the WithoutOverwrite unit test.

bluecheese: /bin/x86_64-linux-gnu-g++-9 --version
x86_64-linux-gnu-g++-9 (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[ 23%] Built target WPEFrameworkCore
[ 28%] Built target WPEFrameworkTracing
[ 33%] Built target WPEFrameworkCryptalgo
[ 43%] Built target WPEFrameworkProtocols
[ 44%] Building CXX object Tests/unit/core/CMakeFiles/WPEFramework_test_core.dir/test_cyclicbuffer.cpp.o
/home/gladish/work/thunder/Thunder/Tests/unit/core/test_cyclicbuffer.cpp: In lambda function:
/home/gladish/work/thunder/Thunder/Tests/unit/core/test_cyclicbuffer.cpp:393:29: error: ‘bufferName’ is not captured
393 | CyclicBuffer buffer(bufferName,
| ^~~~~~~~~~
/home/gladish/work/thunder/Thunder/Tests/unit/core/test_cyclicbuffer.cpp:385:54: note: the lambda has no capture-default
385 | IPTestAdministrator::OtherSideMain lambdaFunc = [](IPTestAdministrator & testAdmin) {
| ^
/home/gladish/work/thunder/Thunder/Tests/unit/core/test_cyclicbuffer.cpp:382:20: note: ‘constexpr const char bufferName [15]’ declared here
382 | constexpr char bufferName[] = "cyclicbuffer04";
| ^~~~~~~~~~
make[2]: *** [Tests/unit/core/CMakeFiles/WPEFramework_test_core.dir/build.make:76: Tests/unit/core/CMakeFiles/WPEFramework_test_core.dir/test_cyclicbuffer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:322: Tests/unit/core/CMakeFiles/WPEFramework_test_core.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

SharedBuffer.h const type casting throws error on gcc 9.x

error log:
|...build-rpi-hyb/tmp/work/cortexa7t2hf-neon-vfpv4-rdk-linux-gnueabi/libcobalt/20.lts.stable-1/recipe-sysroot/usr/include/WPEFramework/core/SharedBuffer.h:132:80: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers] | 132 | _administration->_bytesWritten = static_cast<const uint32_t>(Size()); | | ^ | ...build-rpi-hyb/tmp/work/cortexa7t2hf-neon-vfpv4-rdk-linux-gnueabi/libcobalt/20.lts.stable-1/recipe-sysroot/usr/include/WPEFramework/core/SharedBuffer.h: In member function 'uint32_t WPEFramework::Core::SharedBuffer::Consumed()': | ...build-rpi-hyb/tmp/work/cortexa7t2hf-neon-vfpv4-rdk-linux-gnueabi/libcobalt/20.lts.stable-1/recipe-sysroot/usr/include/WPEFramework/core/SharedBuffer.h:159:80: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers] | 159 | _administration->_bytesWritten = static_cast<const uint32_t>(Size()); | | ^

Possible solution:
to avoid such warning/error, the const type can be removed on static cast

Facing runtime failure in WPEFramework.

Hi,

With latest WPEFramework, facing below runtime error during compositor plugin activation,

[ 2030202 us] Activation of plugin [Compositor]:[Compositor], failed. Error [Instantiating the compositor failed. Could not load: CompositorImplementation]
[ 2150798 us] Activation of plugin [WebKitBrowser]:[WebKitBrowser], failed. Error [/usr/lib/wpeframework/plugins/libWPEFrameworkWebKitBrowser.so: undefined symbol: Core]

Testing platform : rpi3
SRCREV of WPEFramework mentioned in meta-wpe : 2e503d5

Upto below revision of wpeframework committed on 02Jul we did not observe runtime issue,
0b21897

From below revision of wpeframework committed on 02Jul we are observing runtime failure,
50e09c1

[![CLA assistant check](https://cla-assistant.io/pull/badge/not_signed)](https://cla-assistant.io/rdkcentral/Thunder?pullRequest=284) <br/>Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla-assistant.io/rdkcentral/Thunder?pullRequest=284) before we can accept your contribution.<br/><hr/>**Alexandr Gavriliuc** seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please [add the email address used for this commit to your account](https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user).<br/><sub>You have signed the CLA already but the status is still pending? Let us [recheck](https://cla-assistant.io/check/rdkcentral/Thunder?pullRequest=284) it.</sub>

I have signed the CLA but GitHub asks me to do this again

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Alexandr Gavriliuc seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Originally posted by @CLAassistant in #284 (comment)

Double quotes in string values causing errors in deserialization

We are seeing errors in deserialization after call to invoke() when there are double quotes within string values. One of the plugins outputs the following value in its API.
"Toshiba 2.5" HDD MQ01ABD..."

After serialization, I see the double quote is properly escaped.
"manufacturer":"Toshiba 2.5\" HDD MQ01ABD..."

But after deserialization after call to invoke(), it's giving empty value while trying to read the value for "manufacturer".

SmartLinkType<> uses private member from LinkType<>

/home/gladish/work/Thunder/Thunder/Source/core/../websocket/JSONRPCLink.h: In member function ‘uint32_t WPEFramework::JSONRPC::SmartLinkType::Invoke(const char*, const WPEFramework::Core::JSON::VariantContainer&, WPEFramework::Core::JSON::VariantContainer&, uint32_t) [with INTERFACE = WPEFramework::Core::JSON::IElement; uint32_t = unsigned int]’:
/home/gladish/work/Thunder/Thunder/Source/core/../websocket/JSONRPCLink.h:1511:160: error: ‘constexpr const uint32_t WPEFramework::JSONRPC::Li nkTypeWPEFramework::Core::JSON::IElement::DefaultWaitTime’ is private within this context
char method[], const Core::JSON::VariantContainer& parameters, Core::JSON::VariantContainer& response, const uint32_t waitTime = Client::Def aultWaitTime)
^~~~~~
/home/gladish/work/Thunder/Thunder/Source/core/../websocket/JSONRPCLink.h:572:35: note: declared private here
static constexpr uint32_t DefaultWaitTime = 10000;

There are two DefaultWaitTime in that source file, I'm not sure which one was intended.

Activation & JSON RPC connection succeeds on non-existent services

It looks like through CPP implementation activating a non-existent service is possible. This further allows creating clients to that service and making requests possible.

Please refer the attached source file [test_cpp.txt] (https://github.com/rdkcentral/Thunder/files/5236712/test_cpp.txt) which I compiled with below command
${CXX} ~/Tests/test.cpp -o ~/Tests/test ${CXXFLAGS} -lWPEFrameworkCore -lWPEFrameworkDefinitions -lWPEFrameworkProtocols -lWPEFrameworkPlugins -lstdc++ -lWPEFrameworkSecurityUtil -lm -lWPEFrameworkTracing

The output is like

root@arrisxi6:/tmp# ./test abc
SecurityAgent end point /tmp/securityagent
SecurityAgent: Creating Token for http://localhost
-     L1 [23369]: "Message: {"id":1,"method":"status@abc"} send"
Plugin "abc" is not active, error=22
-     L1 [23369]: "Message: {"id":2,"method":"activate","params":{"callsign":"abc"}} send"
Activating plugin "abc" was successful, error=0
-     L1 [23369]: "Message: {"id":3,"method":"status@abc"} send"
Plugin "abc" is not active, error=22
-     L1 [23369]: "Message: {"id":4,"method":"abc.register","params":{ "event": "dummy", "id": ""}} send"
Subscription succeeded
-     L1 [23369]: "Message: {"id":5,"method":"abc.unregister","params":{ "event": "dummy", "id": ""}} send"
===== $$ [23369]: ASSERT [/usr/include/WPEFramework/core/JSONRPC.h:636] ((index != _handlers.end()) && _T("Do not unregister methods that are not registered!!!"))
Aborted (core dumped)
root@arrisxi6:/tmp#

As you can see, I could activate plugins "abc" and subscribe for an event "dummy" after creating a client for it. But "Unsubscribe()" leads to crash.

So below should be addressed

  1. Should activate() request for non-existing services should be failed by returning appropriate error (22)?
  2. Should client creation for non-existing services fail?
  3. Should subscription for events (non-existing) fail and return error?

Note:
activation through curl command fails with proper error code

curl -v -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.aHR0cDovL2xvY2FsaG9zdA.qHyquZp7LWHLeqWpFo-aPqgNCEc9daNDU61g5BEaU1Q" -H "Content-Type: application/json" -X POST -d {"jsonrpc":"2.0","id":1,"method":Controller.1.activate, "params":{"callsign":"abc"}} http://127.0.0.1:9998/jsonrpc
{"jsonrpc":"2.0","id":1,"error":{"code":22,"message":"ERROR_UNKNOWN_KEY"}}

Documentation Request for Execution HowTo

Is there any documentation available for how to execute Thunder? I have built the WPEFramework and WPEProcess binaries for Ubuntu 18.04 LTS 64-bit and installed in a local (non-system) directory.

Are there configuration files or options that need to be passed in?

FYI: I have also built the ThunderUI for testing.

Not able to build with the readme specified steps

CMake Error at Source/WPEFramework/GenericConfig.cmake:310 (message):
( ✿ ◠ ‿ ◠ ) FIXME: If you hit this error you are 'the choosen one'
to fix the generic config using the ConfigGenerator
Call Stack (most recent call first):
Source/WPEFramework/CMakeLists.txt:92 (include)

-- Configuring incomplete, errors occurred!

make failure

$ mkdir build && cd build
$ cmake ../ -DVIRTUALINPUT=ON -DVIRTUALINPUT_TOOLS=OFF
$ make -j16

Platform PC_UNIX

gave the following error

thunder_development/Thunder/Source/tracing/../core/IPFrame.h: In member function ‘WPEFramework::Core::NodeId& WPEFramework::Core::TCPFrameType::Source() const’:
/mnt/23325514-5552-429f-9fd7-decadfe61ebd/elxsi/thunder_development/Thunder/Source/tracing/../core/IPFrame.h:199:89: error: cannot bind non-const lvalue reference of type ‘WPEFramework::Core::NodeId&’ to an rvalue of type ‘WPEFramework::Core::NodeId’
199 | return (result.IsValid() ? NodeId(result, ntohs(tcpHeader->source)) : result);
| ^
/mnt/23325514-5552-429f-9fd7-decadfe61ebd/elxsi/thunder_development/Thunder/Source/tracing/../core/IPFrame.h: In member function ‘WPEFramework::Core::NodeId& WPEFramework::Core::TCPFrameType::Destination() const’:
/mnt/23325514-5552-429f-9fd7-decadfe61ebd/elxsi/thunder_development/Thunder/Source/tracing/../core/IPFrame.h:211:87: error: cannot bind non-const lvalue reference of type ‘WPEFramework::Core::NodeId&’ to an rvalue of type ‘WPEFramework::Core::NodeId’
211 | return (result.IsValid() ? NodeId(result, ntohs(tcpHeader->dest)) : result);
| ^
/mnt/23325514-5552-429f-9fd7-decadfe61ebd/elxsi/thunder_development/Thunder/Source/tracing/../core/IPFrame.h: In member function ‘WPEFramework::Core::NodeId& WPEFramework::Core::UDPFrameType::Source() const’:
/mnt/23325514-5552-429f-9fd7-decadfe61ebd/elxsi/thunder_development/Thunder/Source/tracing/../core/IPFrame.h:259:89: error: cannot bind non-const lvalue reference of type ‘WPEFramework::Core::NodeId&’ to an rvalue of type ‘WPEFramework::Core::NodeId’
259 | return (result.IsValid() ? NodeId(result, ntohs(udpHeader->source)) : result);
| ^
/mnt/23325514-5552-429f-9fd7-decadfe61ebd/elxsi/thunder_development/Thunder/Source/tracing/../core/IPFrame.h: In member function ‘WPEFramework::Core::NodeId& WPEFramework::Core::UDPFrameType::Destination() const’:
/mnt/23325514-5552-429f-9fd7-decadfe61ebd/elxsi/thunder_development/Thunder/Source/tracing/../core/IPFrame.h:271:87: error: cannot bind non-const lvalue reference of type ‘WPEFramework::Core::NodeId&’ to an rvalue of type ‘WPEFramework::Core::NodeId’
271 | return (result.IsValid() ? NodeId(result, ntohs(udpHeader->dest)) : result);

Build error

cmake -HThunder/Tools -Bbuild/ThunderTools -DCMAKE_INSTALL_PREFIX=${THUNDER_INSTALL_DIR}/usr
CMake Error: The source directory "/home/vagrant/thunder/Thunder/Thunder/Tools" does not exist.

Closely related JSON defined objects are incorrectly referenced

If I have two classes in my JSON document, JsonGenerator can accidentally emit the wrong class

consider

  "floatarrayresult": {
    "type": "object",
    "description": "Generic Floating Point Array Result Object",
    "properties": {
      "success": {
        "type": "boolean",
        "description": "Returning whether this method failed or succeed",
        "example": "true"
      },
      "value": {
        "type": "array",
        "items": {
          "type": "float",
          "size": 32
        },
        "description": "The returned float array value"
      },
      "failurereason": {
        "type": "number",
        "description": "Reason why it's failed"
      }
    },
    "required": ["success"]
  },

and

  "stringarrayresult": {
    "type": "object",
    "description": "Generic String Array Result Object",
    "properties": {
      "success": {
        "type": "boolean",
        "description": "Returning whether this method failed or succeed",
        "example": "true"
      },
      "value": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The returned string array value"
      },
      "failurereason": {
        "type": "number",
        "description": "Reason why it's failed"
      }
    },
    "required": ["success"]
  },

The output can mistakenly make methods that return a Stringarrayresult[Info] actaully return a Floatarrayresult[Info]

This is because at a top-level glance, they are the same - the only difference is the type of the element in the values array.

But this is not tested.

A fix will be posted.

ProxyStubGenerator failure

We are seeing the following error during Thunder configure step:

wpeframework/1.99+gitAUTOINC+4594f75b7a-r0/git/Source/proxystubs/../plugins/ProxyStubs_Plugin.cpp'
| ProxyStubGenerator: all done; 1 file processed; 2 interfaces parsed: no errors
| ProxyStubGenerator: Nothing to do
| ProxyStubGenerator: ERROR: OUTDIR: invalid file or directory
| CMake Error at /home/build/paceXi5_2003/build-pacexi5/tmp/sysroots/x86_64-linux/usr/share/cmake-3.8/Modules/FindProxyStubGenerator.cmake:86 (message):
|   ProxyStubGenerator generator failed.
| Call Stack (most recent call first):
|   Source/proxystubs/CMakeLists.txt:29 (ProxyStubGenerator)

This is from a Yocto Morty build with Python 3.52. The full log is attached:
thunder_proxystubgenerator_error.txt

WPEFramework crash when shutting down

We see the following crash when exiting from WPEFramework service:

Core was generated by `WPEFramework -c /etc/WPEFramework/config.json'.
Program terminated with signal 11, Segmentation fault.
#0  0xb6eb6c5a in WPEFramework::RPC::Administrator::~Administrator (this=0xb6ecc754 <WPEFramework::RPC::Administrator::Instance()::systemAdministrator>, __in_chrg=<optimized out>)
    at /usr/src/debug/wpeframework/1.99+gitAUTOINC+0105e8f8ed-r0/git/Source/protocols/Administrator.cpp:38
38                  delete proxy.second;
(gdb) bt
#0  0xb6eb6c5a in WPEFramework::RPC::Administrator::~Administrator (this=0xb6ecc754 <WPEFramework::RPC::Administrator::Instance()::systemAdministrator>, __in_chrg=<optimized out>)
    at /usr/src/debug/wpeframework/1.99+gitAUTOINC+0105e8f8ed-r0/git/Source/protocols/Administrator.cpp:38
#1  0xb6cb4570 in __cxa_finalize (d=0xb6ec8138) at cxa_finalize.c:56
#2  0xb6eabb24 in __do_global_dtors_aux () from /home/build/arrisXi6_2003/build-arrisxi6/tmp/sysroots/arrisxi6/usr/lib/libWPEFrameworkProtocols.so.1.0.0
#3  0xb6f1d024 in _dl_fini () at dl-fini.c:252
#4  0xb6cb42bc in __run_exit_handlers (status=0, listp=0xb6d5e520 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#5  0xb6cb431a in __GI_exit (status=<optimized out>) at exit.c:104
#6  0xb6ca44aa in __libc_start_main (main=0x0, argc=0, argv=0xb6f30000, init=<optimized out>, fini=0x5d695 <__libc_csu_fini>, rtld_fini=0xb6f1cddd <_dl_fini>, stack_end=0xbe805d14) at libc-start.c:319
#7  0x00032994 in _start () at ../ports/sysdeps/arm/start.S:124
  • This is reproducible on the desktop linux with the latest master branch.
  • crash happens even without any plugins loaded.

Unit tests don't link

[ 44%] Linking CXX executable WPEFramework_test_core
/usr/bin/ld: CMakeFiles/WPEFramework_test_core.dir/test_messageException.cpp.o: in function test_messageException_simple_messageException_Test::TestBody()': /home/gladish/work/thunder/Thunder/Tests/unit/core/test_messageException.cpp:31: undefined reference to WPEFramework::Core::MessageException::MessageException(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)'
/usr/bin/ld: /home/gladish/work/thunder/Thunder/Tests/unit/core/test_messageException.cpp:32: undefined reference to WPEFramework::Core::MessageException::Message() const' /usr/bin/ld: /home/gladish/work/thunder/Thunder/Tests/unit/core/test_messageException.cpp:34: undefined reference to WPEFramework::Core::MessageException::MessageException(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)'
/usr/bin/ld: /home/gladish/work/thunder/Thunder/Tests/unit/core/test_messageException.cpp:41: undefined reference to WPEFramework::Core::MessageException::Message() const' /usr/bin/ld: /home/gladish/work/thunder/Thunder/Tests/unit/core/test_messageException.cpp:47: undefined reference to WPEFramework::Core::MessageException::Message() const'
/usr/bin/ld: /home/gladish/work/thunder/Thunder/Tests/unit/core/test_messageException.cpp:34: undefined reference to WPEFramework::Core::MessageException::~MessageException()' /usr/bin/ld: /home/gladish/work/thunder/Thunder/Tests/unit/core/test_messageException.cpp:31: undefined reference to WPEFramework::Core::MessageException::~MessageException()'
/usr/bin/ld: CMakeFiles/WPEFramework_test_core.dir/test_tracing.cpp.o: in function WPEFramework::Trace::TraceType<WPEFramework::Trace::Information, &Tracing>::TraceControl<WPEFramework::Trace::Information, &Tracing>::TraceControl()': /home/gladish/work/thunder/Thunder/Source/tracing/TraceControl.h:91: undefined reference to Tracing'
/usr/bin/ld: CMakeFiles/WPEFramework_test_core.dir/test_tracing.cpp.o: in function WPEFramework::Trace::TraceType<WPEFramework::Trace::Information, &Tracing>::TraceControl<WPEFramework::Trace::Information, &Tracing>::Module() const': /home/gladish/work/thunder/Thunder/Source/tracing/TraceControl.h:114: undefined reference to Tracing'
collect2: error: ld returned 1 exit status
make[2]: *** [Tests/unit/core/CMakeFiles/WPEFramework_test_core.dir/build.make:855: Tests/unit/core/WPEFramework_test_core] Error 1
make[1]: *** [CMakeFiles/Makefile2:322: Tests/unit/core/CMakeFiles/WPEFramework_test_core.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Memory corruption during app exit

With Thunder R4.2, Webprocess is getting crashed randomly during app exit.
It looks to be memory corruption based on the stack trace.

crash1.pdf
crash2.pdf

We enabled AddressSanitizer for webprocess and seeing this error message without the stack trace.
==9==ERROR: AddressSanitizer: heap-use-after-free on address 0xf3617230 at pc 0xf78accb1 bp 0xffc34778 sp 0xffc34790

note: We are not seeing this issue with R2.

CMake Error

I am currently trying to build and install this package and I am currently facing an issue when trying to build and install it. I am using Ubuntu 22.04.1 LTS.

CMake Error at cmake/common/CmakeHelperFunctions.cmake:152 (message):
  WPEFrameworkPlugins wants WPEFrameworkMessaging::WPEFrameworkMessaging is
  assumed to be known cmake Target, but it's not known in this scope, maybe
  you forgot a find_package
Call Stack (most recent call first):
  cmake/common/CmakeHelperFunctions.cmake:583 (get_if_link_libraries)
  Source/plugins/CMakeLists.txt:157 (InstallPackageConfig)

Thank you.

add additional search path in the "activate()" API in order to support downloadable plugins

We'd like to be able to download some resources/libraries needed by an out-of-process thunder plugin. Due to the way lazy loading
works on Linux, we need to update LD_LIBRARY_PATH of the plugin with the location of the downloaded libraries.

Adding the additional path to the Controller's activate() method will let us download some resources anytime before an out-of-process plugin is activated.

Name Type Description
params object  
params.callsign string Plugin callsign
params.additionalLDLibPath string path to downloaded resources (optional)
{
    "jsonrpc": "2.0",
    "id": 42,
    "method": "Controller.1.activate",
    "params": {
        "callsign": "MyDownloadablePlugin",
        "additionalLDLibPath": "/additional/path/to/downloaded/libraries"
    }
}

Standalone build broken

Is this code supposed to build outside the RDK yocto environment?

Attempted to build on Ubuntu 18.04 LTS 64-bit platform using cmake version 3.10.2. The following error occurred:

cmake ~/Projects/Thunder/
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting up WPEFramework v1.0.0
-- Building on Linux
-- Looking for GNU_LIBRARY
-- Looking for GNU_LIBRARY - found
CMake Error at CMakeLists.txt:51 (find_package):
By not providing "FindProxyStubGenerator.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"ProxyStubGenerator", but CMake did not find one.

Could not find a package configuration file provided by
"ProxyStubGenerator" with any of the following names:

ProxyStubGeneratorConfig.cmake
proxystubgenerator-config.cmake

Add the installation prefix of "ProxyStubGenerator" to CMAKE_PREFIX_PATH or
set "ProxyStubGenerator_DIR" to a directory containing one of the above
files. If "ProxyStubGenerator" provides a separate development package or
SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!
See also "/home/msm/Projects/Thunder/build/CMakeFiles/CMakeOutput.log".

JsonGenerator case changes

In the documentation, WPE - API - WPEFramework.docx, it says "All identifiers on the interface described here are case-sensitive. e.g. an id known in the plugin as 'C0FFEE' is not the same as 'c0ffee'. All keywords, entities, properties, relations and actions should be treated as case-sensitive.", but the JsonGenerator does change the case of the names of properties, methods, etc, defined in a plugin's '.json.' file, and the way it changes the case has recently changed in the version that's used by RDK.

A couple of weeks ago if there was a property name defined as "myProperty", this would end up as "MyProperty" in the JsonData header file, but now it has become "Myproperty", with the result that the plugin code will no longer compile.

If the framework is case sensitive, why does the python code change the case of the defined names? But more importantly, why has the way it worked a few weeks ago now changed, resulting in broken code? Was this intended, or is it a bug?

Add 'HANG' deactivation reason

To be used to try to recover in the case when plugin detects a hang of its main event loop.

The expected action for the framework is to send a pre-configured signal(SIGFPE by default) to the plugin if it runs out of process.

The initial implementation of the hang detector in webkitbrwoser plugin uses kill helper to send SIGFPE to itself rdkcentral/rdkservices#162

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.