<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>210261</bug_id>
          
          <creation_ts>2020-04-09 03:51:29 -0700</creation_ts>
          <short_desc>[iOS] DeviceMotionEvent returning value of NULL for acceleration and rotationRate on iOS 13.4</short_desc>
          <delta_ts>2020-04-09 16:06:19 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore JavaScript</component>
          <version>Safari Technology Preview</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 13</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>209831</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="borisstodic">boris.stodic</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>boris.stodic</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1639560</commentid>
    <comment_count>0</comment_count>
      <attachid>395934</attachid>
    <who name="borisstodic">boris.stodic</who>
    <bug_when>2020-04-09 03:51:29 -0700</bug_when>
    <thetext>Created attachment 395934
sample for devicemotionevent

Hi everyone,

It seems like DeviceMotionEvent does not report accelerometer and rotation rate values correctly on iOS 13.4, for both Safari and Chrome. Even if permission is granted through requestPermission() method and event does get triggered, accelerometer and rotationRate value are defaulting to NULL.

The same few-liner sample code(sample will be attached with this bug report) is working on previous versions of iOS v13.3&gt;.

I believe that in iOS 13.4 implementation of DeviceMotionEvent or DeviceMotionAPI is somehow broken. 

Few links which might be related to this issue:

https://trac.webkit.org/changeset/259601/webkit

https://bugs.webkit.org/show_bug.cgi?id=209831

In order to run the attached sample, a file has to be deployed on the https server. Steps to reproduce are:

1. Serve index.html on https
2. Load page
3. hit the button &quot;Init DeviceMotion&quot;
4. check browser console to see results for the event, event.acceleration, event.rotationRate

Thanks,

Boris</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1639941</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2020-04-09 16:06:19 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 209831 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>395934</attachid>
            <date>2020-04-09 03:51:29 -0700</date>
            <delta_ts>2020-04-09 03:51:29 -0700</delta_ts>
            <desc>sample for devicemotionevent</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>668</size>
            <attacher name="borisstodic">boris.stodic</attacher>
            
              <data encoding="base64">PCFkb2N0eXBlIGh0bWw+DQo8aGVhZD4NCgk8bWV0YSBjaGFyc2V0PSJVVEYtOCI+DQoJ4oCLDQoJ
PGxpbmsgcmVsPSJzdHlsZXNoZWV0IiB0eXBlPSJ0ZXh0L2NzcyIgaHJlZj0iLi9zdHlsZS5jc3Mi
Pg0KCTxsaW5rIHJlbD0ic2hvcnRjdXQgaWNvbiIgaHJlZj0iZmF2aWNvbi5pY28iPg0KCeKAiwni
gIsNCgk8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+DQoJPC9zY3JpcHQ+DQo8L2hlYWQ+
DQrigIsNCuKAiw0KDQo8Ym9keT4NCgkJCeKAizxidXR0b24gb25jbGljaz0iaW5pdCgpIiB0eXBl
PSJidXR0b24iPkluaXQgRGV2aWNlTW90aW9uRXZlbnQ8L2J1dHRvbj4NCgnigIsNCgk8c2NyaXB0
Pg0KCQlmdW5jdGlvbiBpbml0KCkgew0KCQkJRGV2aWNlTW90aW9uRXZlbnQucmVxdWVzdFBlcm1p
c3Npb24oKQ0KCQkJCS50aGVuKHJlcyA9PiB7DQoJCQkJCWlmIChyZXMgPT09ICJncmFudGVkIikg
ew0KCQkJCQkJd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ2RldmljZW1vdGlvbicsIGUgPT4gew0K
CQkJCQkJCWNvbnNvbGUubG9nKGUpOw0KCQkJCQkJCWNvbnNvbGUubG9nKGUuYWNjZWxlcmF0aW9u
KTsNCgkJCQkJCQljb25zb2xlLmxvZyhlLnJvdGF0aW9uUmF0ZSk7DQoJCQkJCQl9KQ0KCQkJCQl9
DQoJCQkJfSkNCgkJCX0NCgk8L3NjcmlwdD4NCgnigIsNCjwvYm9keT4=
</data>

          </attachment>
      

    </bug>

</bugzilla>