<?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>206219</bug_id>
          
          <creation_ts>2020-01-14 02:32:10 -0800</creation_ts>
          <short_desc>[HTML5 App] Using &lt;input&gt; to call the device camera returns a blank screen after leaving the App.</short_desc>
          <delta_ts>2020-07-14 02:20:45 -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>Forms</component>
          <version>Safari 13</version>
          <rep_platform>iPhone / iPad</rep_platform>
          <op_sys>iOS 13</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>marcus</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aestes</cc>
    
    <cc>blake.yeager</cc>
    
    <cc>cdumez</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jw</cc>
    
    <cc>louis.ormerod</cc>
    
    <cc>luc</cc>
    
    <cc>rudolf.ermantraut</cc>
    
    <cc>systems</cc>
    
    <cc>todd</cc>
    
    <cc>tykhorses+webkit</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1606321</commentid>
    <comment_count>0</comment_count>
    <who name="">marcus</who>
    <bug_when>2020-01-14 02:32:10 -0800</bug_when>
    <thetext>Hi All,

Issue: When using the following &lt;input&gt; tag to call the camera to take an image to upload in a Standalone application;
&lt;input type=&quot;file&quot; name=&quot;media&quot; id=&quot;media&quot; accept=&quot;image/*;capture=camera&quot; multiple=&quot;&quot;&gt;

Upon first invoking this; the camera works as normal and displays the result allowing to take a picture.
When leaving the app and waiting a period of ~5 seconds, and returning, calling the same &lt;input&gt; tab returns a blank camera output and refuses to take an image.

Reloading the page via any method does not correct the issue; only force quitting from multitasking allows the camera to work again.

Recent reports of this exact same behaviour can be found in the following overflow threads;

https://stackoverflow.com/questions/59422838/ios-camera-returns-black-screen-after-leaving-pwa

https://stackoverflow.com/questions/59254979/ios-standalone-pwa-input-capture

https://stackoverflow.com/questions/59685235/camera-bug-on-ios-13-3-pwa


Personally I need this functionality to work as I&apos;m designing a receipt management system for use with my universities societies that provides the same UI/Functions as if they were viewing it on a desktop (hence HTML5 App.)

Any feedback would be greatly appreciated !</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606325</commentid>
    <comment_count>1</comment_count>
    <who name="">marcus</who>
    <bug_when>2020-01-14 02:49:41 -0800</bug_when>
    <thetext>Uploaded a very basic test environment to install as a HTML5 App to reproduce the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606326</commentid>
    <comment_count>2</comment_count>
      <attachid>387640</attachid>
    <who name="">marcus</who>
    <bug_when>2020-01-14 02:50:26 -0800</bug_when>
    <thetext>Created attachment 387640
HTML5 App Camera bug test</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606697</commentid>
    <comment_count>3</comment_count>
    <who name="Blake Yeager">blake.yeager</who>
    <bug_when>2020-01-14 16:55:03 -0800</bug_when>
    <thetext>We have been experiencing this exact same issue with our PWA (standalone application) with our customers running on iOS 13.2 or 13.3.

Any time we attempt to access the camera after having closed the app and reopened it the camera interface loads, but there is just a black screen with no video feed from the camera. There are camera controls on the top and bottom but capturing an image does not work. This behavior happens the second time you open the app and attempt to use the camera regardless of whether or not you accessed the camera the first time you opened the app.

The only fix we have found for this issue has been swiping up on the app placeholder in the app switcher.

This functionality is critical for our standalone application. I would appreciate any suggestions for potential workarounds or even confirmation from someone who might know what exactly is going on here.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1606812</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-01-14 22:51:24 -0800</bug_when>
    <thetext>&lt;rdar://problem/58596295&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1609081</commentid>
    <comment_count>5</comment_count>
    <who name="tjyoung">todd</who>
    <bug_when>2020-01-21 09:26:43 -0800</bug_when>
    <thetext>Yes i&apos;ve noticed that as well. thats a &apos;new&apos; feature</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1610622</commentid>
    <comment_count>6</comment_count>
    <who name="Doodle Labs">systems</who>
    <bug_when>2020-01-24 05:21:17 -0800</bug_when>
    <thetext>We have also seen this issue with one of our PWAs and we desperately need it fixing as it is having a huge impact on our customers user experience.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1611930</commentid>
    <comment_count>7</comment_count>
    <who name="">marcus</who>
    <bug_when>2020-01-28 08:24:48 -0800</bug_when>
    <thetext>Okay this behavior has started to appear including but sometimes regardless of if the user has left the application.

I very much feel like this is a regression (as in, this behavior worked before after previously not being able to use the input crafted above), but I&apos;ll see what others say before I suggest to mark it as that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1611957</commentid>
    <comment_count>8</comment_count>
    <who name="Blake Yeager">blake.yeager</who>
    <bug_when>2020-01-28 08:52:36 -0800</bug_when>
    <thetext>I agree that this is a regression. This behavior was working in previous versions of iOS including 13.1, and only started showing up in either iOS 13.2 or 13.3 (I haven&apos;t been able to nail down the exact minor version).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1611988</commentid>
    <comment_count>9</comment_count>
    <who name="">marcus</who>
    <bug_when>2020-01-28 09:26:41 -0800</bug_when>
    <thetext>Okay I&apos;m going to remark it as a regression, please feel free to undo if this doesn&apos;t seem correct; however this behavior has not existed previously from development in any scope.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1616121</commentid>
    <comment_count>10</comment_count>
    <who name="rud erm">rudolf.ermantraut</who>
    <bug_when>2020-02-07 04:54:06 -0800</bug_when>
    <thetext>can anyone check if this still a problem in 13.4 beta?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1617510</commentid>
    <comment_count>11</comment_count>
    <who name="Louis Ormerod">louis.ormerod</who>
    <bug_when>2020-02-11 11:05:41 -0800</bug_when>
    <thetext>It is still a problem in 13.4 beta.  The getUserMedia access to the camera appears to have been fixed in the beta, but this issue (camera capture using input element) is still there. 

It works ok on first access to the camera, but you only get a blank screen when putting the app into the background, and then going back to it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1621466</commentid>
    <comment_count>12</comment_count>
    <who name="Blake Yeager">blake.yeager</who>
    <bug_when>2020-02-20 16:08:23 -0800</bug_when>
    <thetext>Does anyone know if there is a more effective way to get the team&apos;s attention on this issue? I feel like it hasn&apos;t even been acknowledged yet, and it remains a huge issue for us and our customer base. I am not an expert on reporting iOS bugs to Apple, but would it be beneficial to report this directly to Apple?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1621492</commentid>
    <comment_count>13</comment_count>
    <who name="">marcus</who>
    <bug_when>2020-02-20 16:55:49 -0800</bug_when>
    <thetext>It’s been raised to P1 already, a high priority due to it’s regression from a previous build. So unfortunately that’s all we can really do. You’re free to email the developers in the CC list but I’d recommend against as they probably get enough emails from bug reports as it is. 

Just keep the report alive to show bother is what we can do!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1621535</commentid>
    <comment_count>14</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2020-02-20 19:06:06 -0800</bug_when>
    <thetext>We are aware of the problem with &lt;input capture&gt; and are continuing to work on a fix.

Thanks for the reports/reminders!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1622000</commentid>
    <comment_count>15</comment_count>
    <who name="Jan">jw</who>
    <bug_when>2020-02-23 09:25:09 -0800</bug_when>
    <thetext>It seems that in iOS 13.4 beta 2 the problem is solved!
Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1671302</commentid>
    <comment_count>16</comment_count>
    <who name="Timo">tykhorses+webkit</who>
    <bug_when>2020-07-14 02:20:45 -0700</bug_when>
    <thetext>I can confirm that I and a customer had this exact issue in 13.3, and that it has been resolved after updating to 13.5.1

Thank you to the people reporting and fixing this issue!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>387640</attachid>
            <date>2020-01-14 02:50:26 -0800</date>
            <delta_ts>2020-01-14 02:50:26 -0800</delta_ts>
            <desc>HTML5 App Camera bug test</desc>
            <filename>test.html</filename>
            <type>text/html</type>
            <size>371</size>
            <attacher>marcus</attacher>
            
              <data encoding="base64">PGh0bWw+DQo8aGVhZD4NCjxtZXRhIGNoYXJzZXQ9InV0Zi04Ij4NCjxtZXRhIG5hbWU9InZpZXdw
b3J0IiBjb250ZW50PSJpbml0aWFsLXNjYWxlPTEsbWF4aW11bS1zY2FsZT0xIj4NCjxtZXRhIG5h
bWU9ImFwcGxlLW1vYmlsZS13ZWItYXBwLXN0YXR1cy1iYXItc3R5bGUiIGNvbnRlbnQ9ImJsYWNr
LXRyYW5zbHVjZW50Ij4NCjxtZXRhIG5hbWU9ImFwcGxlLW1vYmlsZS13ZWItYXBwLWNhcGFibGUi
IGNvbnRlbnQ9InllcyI+DQo8L2hlYWQ+DQoNCjxib2R5Pg0KPGlucHV0IHR5cGU9ImZpbGUiIG5h
bWU9Im1lZGlhIiBpZD0ibWVkaWEiIGFjY2VwdD0iaW1hZ2UvKjtjYXB0dXJlPWNhbWVyYSIgbXVs
dGlwbGU9IiI+DQo8L2JvZHk+DQoNCjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>