$fall_back = $parent_node->fallback(); randomly crash

sam@WU2013
Posts: 11
Joined: Tue Feb 21, 2017 4:09 am

$fall_back = $parent_node->fallback(); randomly crash

Postby sam@WU2013 » Mon May 08, 2017 1:18 am

When I call

Code: Select all

    // device is built using :
    //
    //self::$wurfl_engine = new \ScientiaMobile\WURFL\WURFLEngine($container);
    //$this->device = self::$wurfl_engine->getDeviceForUserAgent($userAgent);

    $this->device->getCapability('ajax_support_javascript'); 
I will end up it scientiamobile/wurfl-api/src/Model/AspectModelProxy.php and crash at line

Code: Select all

    $fall_back = $parent_node->fallback();
with exception

Code: Select all

    BadMethodCallException
    Call to a member function fallback() on a non-object (boolean)
However, such case only happen randomly, and I can hardly reproduce the error, even using the same user agent string.

Here's the stack trace

Code: Select all

BadMethodCallException: Call to a member function fallback() on a non-object (boolean)
#26 /var/www/html/ads-server/vendor/scientiamobile/wurfl-api/src/Model/AspectModelProxy.php(77): getFallbackTree
#25 /var/www/html/ads-server/vendor/scientiamobile/wurfl-api/src/Model/AspectModelProxy.php(98): getCapability
#24 /var/www/html/ads-server/vendor/scientiamobile/wurfl-api/src/Device.php(94): getCapability
an example of user agent string which causes this problem is
Mozilla/5.0 (Linux; Android 4.4.2; GT-I9190 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
Can you provide me some hint, on what is the possible root cause?

aaronp
Posts: 229
Joined: Wed Dec 09, 2015 12:39 pm

Re: $fall_back = $parent_node->fallback(); randomly crash

Postby aaronp » Mon May 08, 2017 10:19 am

Hi Hwa,

Thank you for providing the information. We are also having difficulty replicating this issue as our detection is successful when using the same capability ('ajax_support_javascript') and user agent string ("Mozilla/5.0 (Linux; Android 4.4.2; GT-I9190 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36").

Are you able to confirm the version of your PHP API as well as the date of your current WURFL.xml Snapshot? It is possible that the issue could be resolved with an API update (v1.8.4) as we have not seen the error you are getting after numerous calls. Also, is the error being thrown for multiple capabilities or just 'ajax_support_javascript'?

Thanks,

Aaron

sam@WU2013
Posts: 11
Joined: Tue Feb 21, 2017 4:09 am

Re: $fall_back = $parent_node->fallback(); randomly crash

Postby sam@WU2013 » Tue May 09, 2017 3:47 am

We are using API from onsite_1.8.3.0_PHP_API_14258.zip

In our production, we are using runtime hhvm:3.6.1

aaronp
Posts: 229
Joined: Wed Dec 09, 2015 12:39 pm

Re: $fall_back = $parent_node->fallback(); randomly crash

Postby aaronp » Tue May 09, 2017 1:15 pm

Hi Hwa,

We are still working on replicating this issue. Are you also able to provide the following pieces of information:

- PHP API Version
- PHP API Config file
- wurfl.zip
- patch files (if any)
- Code sample that allow to replicate the issue (if possible)
- PHP Version
- The storage or cache type and version (if not File, example: Redis 3.2.8, MySQL 5.7.18)
- OS Name and Version

Please do not hesitate to send this information over to support@scientiamobile.com and a ticket will automatically be created for you.

Thanks,

Aaron

aaronp
Posts: 229
Joined: Wed Dec 09, 2015 12:39 pm

Re: $fall_back = $parent_node->fallback(); randomly crash

Postby aaronp » Fri May 12, 2017 1:02 pm

Hi Hwa,

Just wanted to check in with you to see how everything was going on your end. Whenever you are ready to do so, please feel free to send the previously requested information over to us either here, or at support@scientiamobile.com

Look forward to hearing back.

Thanks,

Aaron


Who is online

Users browsing this forum: No registered users and 1 guest