[camera] Run iOS methods on UI thread by default

In flutter/flutter#25959 we found that not everything in the iOS camera implementation should be run on the UI thread, as that blocks the app UI. The solution was to run everything on a different thread.
In flutter/flutter#52578 we found that we should not run everything on a different thread, because for example sending the result should be done on the UI thread.
In PR #4007 it is decided that things should run on UI thread by default and exceptions are made for heavy operations.
In flutter/flutter#25959 the author stated that "it's recommended that AVCaptureSession operations be called on a dedicated serial DispatchQueue". That means that initWithCameraName, start and stop need to be run on a different thread, but I'm not sure if these are the only ones blocking the UI.
Pre-launch Checklist

[X] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[X] I read the Tree Hygiene wiki page, which explains my responsibilities.
[X] I read and followed the relevant style guides and ran the auto-formatter. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
[X] I signed the CLA.
[X] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[X] I listed at least one issue that this PR fixes in the description above.
[x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
[x] I updated CHANGELOG.md to add a description of the change.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
[X] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@stuartmorgan I resolved most of your comments and asked for clarifications on the others. Can you have a look at this PR again?


Creating package registration file: /tmp/pkgConf-q-0.1.07198853861649760492.0
        LICENSE: copyFile: does not exist (No such file or directory)
        cabal: Leaving directory '/tmp/cabal-install-test-2044/should_run/q'

        <stderr> was:
        Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
        update' to download it.
        cabal: Error: some packages failed to install:
        q-<IP_ADDRESS> failed during the final install step. The exception was:
        ExitFailure 1
  sandbox-sources
    should_run
      remove_nonexistent_source.sh (ignoring stdout+stderr):              OK (0.71s)
      report_success_removing_source.sh (ignoring stderr):                OK (0.71s)
    should_fail
      fail_removing_source_thats_not_registered.sh (ignoring stdout):     OK (0.46s)
  user-config
    should_run
      overwrites_with_f.sh (ignoring stderr):                             OK (0.02s)
      runs_without_error.sh (ignoring stderr):                            OK (0.02s)
      uses_CABAL_CONFIG.sh (ignoring stderr):                             OK (0.01s)
    should_fail
      doesnt_overwrite_without_f.sh (ignoring stdout):                    OK (0.02s)

5 out of 27 tests failed (34.22s)

@bergmark It looks like you need to install -dyn and -prof versions of GHC (I'm assuming that you're using @hvr's packages) and run cabal update before running cabal-install's test suite.

@bergmark
See https://github.com/fpco/stackage/pull/1820.

run cabal update before running cabal-install's test suite.

I can fix this on the cabal-install side, but you'll have to wait until the next point release.

Thanks! Please send another PR if cabal-install gets the needed update.


Having an issue.

This is showing up when I try running it.
what am I missing?

Oh, you need to create a directory "logs" first. Sorry about that.

Oh, you need to create a directory "logs" first. Sorry about that.

Okay so once create the directory, it should be working right?
Also, what is the command syntax, etc

Okay so once create the directory, it should be working right?
Also, what is the command syntax, etc

Yes.
The default prefix is - (you can change this)
Use -help to see all the commands.

Yes.
The default prefix is - (you can change this)
Use -help to see all the commands.

created the logs directory and run the program to see this happen.

created the logs directory and run the program to see this happen.

Well, whatever that is, this is not my code. There is no client.py in my bot. And I don't even use .strip() in this project.

Well, whatever that is, this is not my code. There is no client.py in my bot. And I don't even use .strip() in this project.

lmao i downloaded the code from this repository

lmao i downloaded the code from this repository

Yeah I see the errors are from the discord library.
Looks like you didn't add your token correctly.

Yeah I see the errors are from the discord library.
Looks like you didn't add your token correctly.

i created a text document, then added--> DISCORD_TOKEN=token
then saved it with the name .env
am i making a mistake?

i created a text document, then added--> DISCORD_TOKEN=token
then saved it with the name .env
am i making a mistake?

If your file is still a text file, yes. The file needs to be called ".env", no file extension.

If your file is still a text file, yes. The file needs to be called ".env", no file extension.

Hey thanks for your response. The bot is working fine!

Hey thanks for your response. The bot is working fine!


fix: output AWS Lambda / AWS HTTP API V2 breaks RSC POST requests url needed for server actions

This fix is hack to revert the decoded url in the rawPath property provided by the AWS API Gateway with a HTTP API V2 Event.
The hack will only apply to POST request which start with /RSC/.
There is no way to fix this in the Hono layer as an arbitrary decoded Path cannot be encoded back to the same original!
see https://github.com/honojs/hono/issues/2156
Without this fix, the url: new URL(c.req.url), will ignore everything after the # on the decoded url.
default url (e.g. node environment):
http://localhost/RSC/%40id%2Fassets%2Frsf0.js%23save.txt
url (AWS API Gateway):
<EMAIL_ADDRESS>new URL(http://localhost/RSC/@id/assets/rsf0.js#save.txt').pathname =><EMAIL_ADDRESS>missing: #save.txt
https://github.com/dai-shi/waku/blob/32d52242c1450b5f5965860e671ff73c42da8bd0/packages/waku/src/lib/middleware/hono-utils.ts#L49-L63

Is adding the parameters as url encoded path segment after /RSC/ the official protocol for react server actions?

It's Waku's protocol.

For server components, the current approach should be mostly fine. But, I'm not 100% happy with protocol for server actions. We can revisit it.

Hmm, it seems like the hono issue will be resolved before we make a new release. Can we wait for the upstream fix?

There is no way to resolve this issue - only the team at AWS API Gateway can fix this and I know no way to get this reported.

If you can wait, I would like to fix it by avoiding URL encode in Waku core, because I wasn't very happy with it. Please give me some time.

@aheissenberger Can you confirm if #463 fixes it?

@aheissenberger Can you confirm if #463 fixes it?

yes - changing the id in the url fixed the problem :-)