FlutterFlow / flutterflow-issues

A community issue tracker for FlutterFlow.
130 stars 26 forks source link

Conditional Action for microphone permission check crashes #3498

Open avithe1 opened 3 months ago

avithe1 commented 3 months ago

Can we access your project?

Current Behavior

Microphone conditional check crashes on the WEB

Expected Behavior

Microphone conditional check should return either true or false but not crash with "uncaught" exception.

Steps to Reproduce

The following steps do not work anymore on the WEB (not tested on devices)

  1. Create a new project
  2. Give microphone permission on the settings page
  3. Enable WEB
  4. Add a button on home page
  5. Go to action editor for the button
  6. Add an action and give it "Request permission" for microphone
  7. Add conditional action and check condition for microphone access, add snackbars to see true and false
  8. Publish the WEB app
  9. Navigate to the published WEB app on the browser (I have tried on Chrome and Firefox)
  10. Click the button
  11. Permission dialog will appear
  12. Grant permission
  13. See console of Firefox : Uncaught : TypeError: Missing required 'name' member of PermissionDescriptor. main.dart.js:4235:19
  14. See console of Chrome : "Uncaught"

Reproducible from Blank

Bug Report Code (Required)

IT4gi8rlx4ZOxc9f1s+Nde9WjWEUJVM1RIc0st5Hd0gdCOPrBu0QPs7CUFBpTc+raVNcPGeihngE/8LrkfDxFfAoYEmrGdRyyahMUg7ke2itVcWUO86OWnR6I9NbGBGH3Ku3hR5CFPBZdC0B2Dquf+6WZDTDFOu/Zwh9f6PHaOI=

Visual documentation

Screenshot 2024-07-29 at 8 42 00 AM Screenshot 2024-07-29 at 8 41 39 AM

Environment

- FlutterFlow version: 4.1.78+
- Platform: WEB
- Browser name and version: Chrome 126.0.6478.183 and Firefox 128.0.2
- Operating system and version affected: Mac OS Sonoma 14.5

Additional Information

I am no longer able to access Microphone for voice recording which is an essential module of my application. The microphone request action works fine and I am able to grant permission for microphone but the conditional check after this fails(crashes).

msusviela commented 3 months ago

Thanks! I was able to reproduce the issue and I'll send it to ENG so they can work on this

KevinVan720 commented 3 months ago

Hi @avithe1. This seems to be a bug within the permission_handler package that we use to handle permissions: https://github.com/Baseflow/flutter-permission-handler/issues/1353. Could you try the workaround mentioned in this link? Add permission_handler_html: 0.1.1 as a custom dependency (into any custom widget/action). This seems to have fixed the issue based on my testing locally.