🐛 [firebase_auth] Sign in with Apple on iOS doesn't trigger userChanges() if reauthenticate was cancelled before the sign in

Bug report
Describe the bug
I'm trying to implement delete user functionality on my app. Delete requires that user reauthenticates before deletion. It works fine except in case user changes their mind last minute and cancel the reauthentication. The cancellation is also fine except when they sign out then try to sign in again. Sign out works fine but sign in doesn't do anything. The three methods authStateChanges, idTokenChanges and userChanges don't get triggered. That happens once. It works if the user try to sign in for the second time. That's a bad user experience anyway.
Steps to reproduce
Steps to reproduce the behavior:

Create a flutter project, setup flutter fire with an iOS app, add firebase_core and firebase_auth dependencies and include the code below in main.dart
Run the app on a physical iOS device
Click on Sign in with Apple button and follow iOS instructions
It should sign you in and displays your firebase UID, delete user button and a sign out button
Sign out
Sign in again
Tap the delete button. It will require reauthentication
Cancel the reauthentication with the X button.  It will log a user cancellation error which is fine
Sign out
Sign in
Nothing will ever happen
Sign in again
You will be signed in and shown your firebase UID

Expected behavior
Step 11 above should be a successful sign in and your firebase UID should be shown
Sample project
Here is a main.dart
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';

import 'firebase_options.dart';

late final FirebaseApp app;
late final FirebaseAuth auth;

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  // We store the app and auth to make testing with a named instance easier.
  app = await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  auth = FirebaseAuth.instanceFor(app: app);

  runApp(const AuthExampleApp());
}

// App
class AuthExampleApp extends StatelessWidget {
  const AuthExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'Test Firebase Apple Sign in App',
        home: Scaffold(body: SafeArea(
          child: LayoutBuilder(builder: (context, constraints) {
            return Center(
              child: StreamBuilder<User?>(
                // stream: auth.authStateChanges(),
                // stream: auth.idTokenChanges(),
                stream: auth.userChanges(),
                builder: (context, snapshot) {
                  if (snapshot.hasData) {
                    return const ProfilePage();
                  }
                  return const AuthGate();
                },
              ),
            );
          }),
        )));
  }
}

// Authentication
class AuthGate extends StatefulWidget {
  const AuthGate({super.key});

  static String? appleAuthorizationCode;

  @override
  State<AuthGate> createState() => _AuthGateState();
}

class _AuthGateState extends State<AuthGate> {
  @override
  Widget build(BuildContext context) {
    // Sign in button
    return ElevatedButton(
        onPressed: _signInWithApple, child: const Text('Sign in with Apple'));
  }

  Future<void> _signInWithApple() async {
    try {
      final appleProvider = AppleAuthProvider();
      appleProvider.addScope('email');

      final userCred = await auth.signInWithProvider(appleProvider);
      AuthGate.appleAuthorizationCode =
          userCred.additionalUserInfo?.authorizationCode;
    } on Exception catch (e) {
      print(e);
    }
  }
}

// Profile Page
class ProfilePage extends StatefulWidget {
  const ProfilePage({super.key});

  @override
  State<ProfilePage> createState() => _ProfilePageState();
}

class _ProfilePageState extends State<ProfilePage> {
  late User user;

  @override
  void initState() {
    user = auth.currentUser!;
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return SafeArea(
        child: Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        // User UID
        Text(user.uid),
        // Delete user button
        ElevatedButton(
            onPressed: () async {
              try {
                await user.reauthenticateWithProvider(AppleAuthProvider());
                await user.delete();
              } on Exception catch (e) {
                print(e);
              }
            },
            child: const Text('Delete user')),
        // Sign out button
        ElevatedButton(
            onPressed: () async => await auth.signOut(),
            child: const Text('Sign out')),
      ],
    ));
  }
}

Additional context
I feel the problem is in reauthenticateWithProvider somewhere

Flutter doctor
Run flutter doctor and paste the output below:
Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.8, on macOS 14.1.2 23B92 darwin-arm64, locale en-AU)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.85.1)
[✓] Connected device (4 available)
[✓] Network resources

• No issues found!

Flutter dependencies
Run flutter pub deps -- --style=compact and paste the output below:
Click To Expand
Dart SDK 3.1.4
Flutter SDK 3.13.8
flutter_firebase_apple_signin 0.1.0

dependencies:
- firebase_auth 4.15.3 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 2.24.2 [firebase_core_platform_interface firebase_core_web flutter meta]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math web sky_engine]

dev dependencies:
- flutter_lints 2.0.3 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math async boolean_selector characters collection material_color_utilities meta source_span stream_channel string_scanner term_glyph web]

transitive dependencies:
- _flutterfire_internals 1.3.16 [collection firebase_core firebase_core_platform_interface flutter meta]
- async 2.11.0 [collection meta]
- boolean_selector 2.1.1 [source_span string_scanner]
- characters 1.3.0
- clock 1.1.1
- collection 1.17.2
- fake_async 1.3.1 [clock collection]
- firebase_auth_platform_interface 7.0.9 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 5.8.12 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser js meta]
- firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.10.0 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math web]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- js 0.6.7 [meta]
- lints 2.1.1
- matcher 0.12.16 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.5.0 [collection]
- meta 1.9.1
- path 1.8.3
- plugin_platform_interface 2.1.7 [meta]
- sky_engine 0.0.99
- source_span 1.10.0 [collection path term_glyph]
- stack_trace 1.11.0 [path]
- stream_channel 2.1.1 [async]
- string_scanner 1.2.0 [source_span]
- term_glyph 1.2.1
- test_api 0.6.0 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- typed_data 1.3.2 [collection]
- vector_math 2.1.4
- web 0.1.4-beta

Reproducible using the code sample and the steps provided above.
See the recording below. The video ends at step 11 because the it doesn't take more than 5 seconds for the UID to show up when the user is authenticated, but it does in this case. If I do continue to step 13 it doesn't take long for the data to show up.
https://github.com/firebase/flutterfire/assets/88313112/d8eda6ee-450a-46d8-bb9e-8d7c51c2268a
cc @russellwheatley


Redox OS support

Adds support for Redox OS.
If you can release this crate after merging this, that would be great! It is needed for porting other crates to Redox

Thanks. Released version 0.1.5

Thank you!


[branch-2.0]enhancement fault injection for segcompaction test (#25709)

Proposed changes

generalized debug point facilities from docker suites for fault-injection/stubbing cases
add segcompaction fault-injection cases for demonstration
add -238 TOO_MANY_SEGMENTS fault-injection case for good

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

run build

run buildall

run p0

run arm


Support DVT flash memory

fomu@fomu-jig:~ $ fomu-flash -i -t 4
Manufacturer ID: unknown (c2)
Memory model: unknown (28)
Memory size: unknown (15)
Device ID: 15
Serial number: ff ff ff ff
Status 1: 00
Status 2: ff
Status 3: 49
fomu@fomu-jig:~ $

Drive by observation (I spotted this issue while looking up something else): from the schematic it looks to me like the flash chip on the Fomu DVT is Macronix MX25R1635FZUIH0, and it appears https://github.com/im-tomu/fomu-flash/commit/38128157746c2d96e66a3eeddd84c5bb3568dc2a adds support for the Macronix MX25R1635F which based on the date seems to be added around the time that this issue was opened.
So maybe this issue can be closed?  (Or perhaps clarified to say there's more specific support for that chip to be added, if it's actually going to be added -- I'm unclear if the same flash chip will be used on the production board, or if this flash chip support will be limited to the "not distributed, other issues found" DVT boards.  If it's only on the DVT board, and the DVT board won't get any more support, those missing features possibly don't matter?)
Ewen

That's a very good observation!
I added support for that part when I had the test jig for all of a day.  It has just enough support to validate that all four pins work -- i.e. QSPI functions as it should.
It doesn't have complete support, in that security pages don't necessarily work yet and I haven't spent much time with the final DVT boards.  Hence this issue is a work-in-progress.


Minor kernel updates

Some minor updates to the kernels, mostly to change integers to floats. Main change is to update the CheckErrorThroughSurface kernel to now place particles at the ocean surface (fieldset.z_start) rather than just delete them.

Codecov Report
Attention: Patch coverage is 0% with 14 lines in your changes missing coverage. Please review.

Project coverage is 66.75%. Comparing base (6643291) to head (f569f25).

Files with missing lines
Patch %
Lines

plasticparcels/kernels.py
0.00%
14 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #53      +/-   ##
==========================================
- Coverage   66.85%   66.75%   -0.10%
==========================================
  Files           8        8
  Lines         715      716       +1
==========================================
  Hits          478      478
- Misses        237      238       +1

Flag
Coverage Δ

unit-tests
66.75% <0.00%> (-0.10%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


duplicate decrease for ExecuteLimitFilter onError

What is the purpose of the change
Related to #4276
Brief changelog
XXXXX
Verifying this change
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Make sure there is a GITHUB_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Format the pull request title like [Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
[ ] Run mvn clean install -DskipTests=false & mvn clean test-compile failsafe:integration-test to make sure unit-test and integration-test pass.
[ ] If this contribution is large, please follow the Software Donation Guide.

Codecov Report

Merging #4380 into 2.7.3-release will decrease coverage by 0.01%.
The diff coverage is 42.85%.

@@                 Coverage Diff                 @@
##             2.7.3-release    #4380      +/-   ##
===================================================
- Coverage            62.87%   62.85%   -0.02%
+ Complexity             505      502       -3
===================================================
  Files                  769      769
  Lines                32995    33007      +12
  Branches              5215     5219       +4
===================================================
+ Hits                 20746    20747       +1
- Misses                9844     9850       +6
- Partials              2405     2410       +5

Impacted Files
Coverage Δ
Complexity Δ

...c/main/java/org/apache/dubbo/rpc/RpcException.java
83.33% <0%> (+0.57%)
0 <0> (ø)
:arrow_down:

...org/apache/dubbo/rpc/filter/ActiveLimitFilter.java
88% <42.85%> (-7.46%)
0 <0> (ø)

...rg/apache/dubbo/rpc/filter/ExecuteLimitFilter.java
69.23% <50%> (-6.96%)
0 <0> (ø)

...e/dubbo/remoting/transport/netty/NettyChannel.java
54.11% <0%> (-8.24%)
19% <0%> (-2%)

...bo/rpc/cluster/support/FailbackClusterInvoker.java
67.21% <0%> (-3.28%)
0% <0%> (ø)

.../exchange/support/header/HeaderExchangeServer.java
65.09% <0%> (-1.89%)
0% <0%> (ø)

...org/apache/dubbo/registry/redis/RedisRegistry.java
48.15% <0%> (-0.29%)
31% <0%> (-1%)

...he/dubbo/registry/multicast/MulticastRegistry.java
69.23% <0%> (+1.35%)
0% <0%> (ø)
:arrow_down:

...pache/dubbo/registry/support/AbstractRegistry.java
81.6% <0%> (+1.53%)
0% <0%> (ø)
:arrow_down:

... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bfa52b2...55d70e1. Read the comment docs.


is this being actively maintained?

I see 7 months of inactivity.. Is this still active?

Hey sorry. I have had a busy few months. Happy for more participators to join the project!


Upgrades Reaction to 3.1.3

This is required for the BNMO demo meeting shortly, and includes the recent feature work of the Purchase team on the Order app, and necessary metaphysics schema upgrades.

I don't think I'll ever get used to the noise generated in Yarn lock files.

We'll want to update the package.json too, no?

Oh okay, right.


Add table of contents

Codecov Report

Merging #161 (7e815b8) into master (a774d36) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #161   +/-   ##
=========================================
  Coverage     45.49%   45.49%
  Complexity      491      491
=========================================
  Files           129      129
  Lines          2462     2462
  Branches        303      303
=========================================
  Hits           1120     1120
  Misses         1254     1254
  Partials         88       88

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a774d36...7e815b8. Read the comment docs.


Update yamls for export of Envoy stats

These updates do the following:

add the official statsd-to-prometheus exporter binary to the Mixer deployment
configure the prometheus addon to pull data from two new places (mixer itself and the statsd-to-prometheus binary) in addition to the prometheus adapter
tell pilot to use istio-mixer:9125 for mesh config for statsd export

build istio/presubmit

Jenkins job istio/presubmit passed

Note, the IBM Container Service tests are failing consistently with:

#################################
Deploying ISTIO
#################################
service "istio-egress" created
deployment "istio-egress" created
service "istio-ingress" created
serviceaccount "istio-ingress-service-account" created
deployment "istio-ingress" created
service "istio-mixer" created
deployment "istio-mixer" created
configmap "istio" created
service "istio-pilot" created
serviceaccount "istio-pilot-service-account" created
deployment "istio-pilot" created
Error from server (BadRequest): error when creating "/tmp/kubetest.telVF/istio/istio-mixer.yaml": ConfigMap in version "v1" cannot be handled as a ConfigMap: [pos 43]: json: expect char '"' but got char 'n'
/var/jenkins_home/workspace/istio-armada-release-test/tests/kubeUtils.sh: line 41: Failed to create control plane (exit 1)

Doesn't look like it's failing for istio/presubmit in the same manner.

Jenkins job istio/presubmit passed

Jenkins job istio/presubmit passed


[chip,dv] fix closed source test failure

chip_csr_mem_rw_with_rand_reset failed in closed source due to long boot up time.
When booting time is long, concurrent reset task started before the boot is finished.
This triggers the next csr_rw sequence while reset is in progress.
Add wait for reset deassert before concurrent reset task for closed source test.

@jdonjdon, I think rather than add wait cycles we could wait for pwrmgr's fetch_en_o output to become active. In fact, this can be done for both open or close source, as it indicates the rest of the chip is ready for the CPU to start.

@jdonjdon can you consider the suggestion in my previous comment?

Thanks for the suggestion. I am looking into it.
Just to be clear, wait_to_issue_reset is used by cip_base_vseq(https://cs.opensource.google/opentitan/opentitan/+/master:hw/dv/sv/cip_lib/seq_lib/cip_base_vseq.sv;drc=4d77215e28c6b62f0feb1af8ec692882fe8ddf1a;l=709)
So potential update will be made in the same overridden task.

@matutem I tried wait(cfg.chip_vif.pwrmgr_cpu_fetch_en == 1); instead of wait_for_reset_deassert();
But test failed.
Since this test use stub cpu, I think cpu status is not quite relevant.
What we need for issue_rand_reset thread ( https://cs.opensource.google/opentitan/opentitan/+/master:hw/dv/sv/cip_lib/seq_lib/cip_base_vseq.sv;drc=4d77215e28c6b62f0feb1af8ec692882fe8ddf1a;l=708) is blocking
apply_resets_concurrently() until previous reset cycle complete.
WDYT?

@jdonjdon The pwrmgr sets fetch_en after a reset is done and rom integrity checks pass, and the device is "active", so it is an output to the CPU. It should be safe. I am quite surprised the test fails, was fetch_en not set?

@jdonjdon The pwrmgr sets fetch_en after a reset is done and rom integrity checks pass, and the device is "active", so it is an output to the CPU. It should be safe. I am quite surprised the test fails, was fetch_en not set?
@matutem fetch_en comes after the reset. That is not a problem.
In this test, we have a parallel reset thread. From (https://cs.opensource.google/opentitan/opentitan/+/master:hw/dv/sv/cip_lib/seq_lib/cip_base_vseq.sv;drc=4d77215e28c6b62f0feb1af8ec692882fe8ddf1a;l=671) you can see,

run_tl_errors_vseq  // high priority
dv_vseq.start        // our main csr_rw
issue_rand_reset
So dv_vseq.start late and it actually issue csr rw whlie issue_rand_reset assert reset
So Add wait for fetch enable to issue_rand_reset doesn't prevent this parallel thread assert reset.

@matutem I updated short term solution as we discussed and
add #19445 for our midterm improvement.


Changes to tskit-like API

There are a few differences between the API for GIGlib and tskit. It's probably worth noting them down somewhere for an FAQ.
One that I'm not sure about is whether we should encourage the more Pythonic len(gig.edges) instead of the tskit-like gig.num_edges. I'm inclined to go with the former?

Using len also means we don't have to create more properties, so I agree that it's simpler that way. I'll make a note to post here if we change tskit conventions again. Most of the differences I can think of are either due to the new complexities of the data structure or are just missing features that we haven't ported over yet.

Documented in the main README (https://github.com/hyanwong/GeneticInheritanceGraphLibrary#api-differences). Closing


Grading view: increment/decrement allowed for adjustment although outside valid range

This happens when max_(xp|grade) is 0

If max_grade is 0, it means the question will not be graded. If it is intended to be graded, then max_grade should be >0


Playback not working on Kodi/OSMC

I have a whole-house audio system using OSMC - It is showing up as player in Home Assistant, and I can control it from there (i.e. pause playback once it is playing). However, music assistant does not actually start playback on OSMC.
The OSMC is online and fully functional.
Whenever I try to play something from music assistant to OSMC, I see this in the logs:
2022-06-16 10:08:59 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 160, in serve_queue_stream
await queue_stream.subscribe(client_id, resp.write)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 311, in subscribe
assert not self.done.is_set(), "Stream task is already finished"
AssertionError: Stream task is already finished
2022-06-16 10:09:00 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 160, in serve_queue_stream
await queue_stream.subscribe(client_id, resp.write)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 311, in subscribe
assert not self.done.is_set(), "Stream task is already finished"
AssertionError: Stream task is already finished
2022-06-16 10:09:00 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 160, in serve_queue_stream
await queue_stream.subscribe(client_id, resp.write)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 311, in subscribe
assert not self.done.is_set(), "Stream task is already finished"
AssertionError: Stream task is already finished
2022-06-16 10:09:00 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 160, in serve_queue_stream
await queue_stream.subscribe(client_id, resp.write)
File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 311, in subscribe
assert not self.done.is_set(), "Stream task is already finished"
AssertionError: Stream task is already finished

and
2022-06-16 10:03:03 ERROR (MainThread) [homeassistant.components.kodi.media_player] Error calling async_update on entity media_player.osmc: TransportError("Error calling method 'Player.GetActivePlayers': Transport Error", TimeoutError())
2022-06-16 10:03:17 ERROR (MainThread) [homeassistant.components.kodi.media_player] Error calling async_update on entity media_player.osmc: TransportError("Error calling method 'Player.GetActivePlayers': Transport Error", ClientConnectorError(ConnectionKey(host='<IP_ADDRESS>', port=80, is_ssl=False, ssl=None, proxy=None, proxy_auth=None, proxy_headers_hash=1996882747), ConnectionRefusedError(111, "Connect call failed ('<IP_ADDRESS>', 80)")))

is this supposed to work? anything I can do to help?

Hi Jeroen
I'm not familiar with OSMC, but it is a media center by itself. not sec a media player (speaker alike). The players that are confirmed to work with MA are these (readme):
Google Cast players
Kodi
Slimproto Squeezebox players
Sonos
Linkplay
As OSMC claims to be able to stream from other devices, it most likely is possible, but you are the first one trying these players with MA. I propose to change this issue into a Feature Request if you like.
I guess Marcel will have a look at the loggings as well. Thanks !!!
Best Eric

Kodi = OSMC and that used to work once. Looking at the log it's connecting and disconnecting again.
I will try a Kodi player later this week

Ok a bug instead :-)

I checked in a small fix that might be related to this issue. I noticed some players do an HTTP HEAD request before they fetch the actual audio data (GET request). The streamer was already launched on the HEAD request and that's what I fixed. Maybe this issue is now fixed (I did not test it yet) ?

Cool, my mistake confirms that it's indeed a head request being made. So if I fix the sloppy assignment issue I think it should work. Fingers crossed for next release ;-)

@jeroenterheerdt can you check if this issue is resolved with the 2022.6.2 version ?

unfortunately it is not. The assignment error is gone, but the stream problem is the same:
Logger: aiohttp.server
Source: /usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py:405
First occurred: 4:53:53 PM (4 occurrences)
Last logged: 5:08:05 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 168, in serve_queue_stream
    await queue_stream.subscribe(client_id, resp.write)
  File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 318, in subscribe
    assert not self.done.is_set(), "Stream task is already finished"
AssertionError: Stream task is already finished

I want to note that if OSMC is already playing the playback is stopped, so it's definitely communicating with music assistant, but unfortunately the playback never starts (regardless if OSMC was idle or not before trying to play from music assistant).

Problem is that the player does a duplicate request. Once to do a metadata lookup and then the real request.
By that time the streamsession is already closed. I'll try if I can auto detect this and if not introduce a small toggle.

Added Kodi to the title because it is practically the same as OSMC and has this same issue.

Looked at this issue today. Kodi is doing 4 (!!) requests to the stream (HEAD request twice and 2 GET's) which is why it fails.
I have no idea why Kodi is doing that or what it expects from Music Assistant to answer. I could write a very ugly workaround to simply ignore the first disconnecting requests but I'd rather want to fix it at its roots.
@koying this looks similar to the issue with Mopidy - do you by any chance have such an advanced trick for Kodi too ?
Or is there something I can do at the MA side with headers or such to let Kodi back off with the additional requests ?

I don't know, sorry.
Probably best asked on the Kodi forum how those "single-use url" are/should be handled.
I suspect Kodi might open the stream the 1st time to analyse and create the proper playback path, as it typically doesn't rely on filenames...

Been testing for a few hours and Kodi behaves really strange when it comes to connecting to a FLAC stream (without duration) and keeps connecting over and over completely ignoring the fact that there is no content length. It even fails to detect the content type from the headers even though it is literally set to "audio/flac".
Even when I ignore the duplicate GET request and get it playing it keeps connecting over and over with multiple requests for no reason. Only when I serve a file with an actual duration it calms down and it accepts the request. Point is that a FLAC stream of no duration is served, just like an online radio stream. So I decided to monitor Kodi (debug log turned on) while connecting to a random radio stream from internet. Guess what, same behavior. Duplicate HEAD request, GET request and a final GET request including a request for ICY metadata. So there is an implementation error in Kodi undetected. The details should have been grabbed in the first HEAD request.
Anyways.... If somebody want to discuss that with the Kodi devs that's probably the best solution as it is a broader issue and not just with MA. Difference is that MA disconnects the stream on that second GET request.
I'll implement a (hopefully temporary) workaround in the code. If the user agent matches Kodi/OSMC I will ignore the first GET request and only start the stream on the second. I'll pass in some silence in the first request just to not upset the whole thing.
My feeling of what is wrong is that Kodi is trying to fetch the duration from the actual stream, hence the first GET request.
That duration is not going to be there because it is an "endless" FLAC stream. I even tried instructing ffmpeg to write a duration of 48 hours but that is not possible as it seems.
Please test the fix/workaround in next 2022.6.5 patch release.
Thanks!

Oh btw also some good news from this. I actually implemented ICY metadata now in the stream so that Kodi actually displays whatever is playing.

fix released in 2022.6.5. Thanks!

Still not working here im afraid, on latest version.
Seems to load / play for 1 / 3 secs then stops as before.
Im on latest HA, MA & Kodi

Did you test it from the Music Assistant panel itself ?

Yes.
Tried a Spotify Track from a playlist and a local file - both fail to play here.

If it does still fail there's nothing I can do anymore and Kodi/OSMC will move to the "unsupported" section until they fix their bugs.

Yes, i confirm im using Music Assistant and not the media browser.

1.) Yes & Yes. If you tell me where i can copy this info out of HA to prove it to you i'll take a screenshot.
MA:  2022.6.5 (from HACS)
HA:
Home Assistant Core 2022.6.7
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.2
2.)
2022-06-24 10:09:19 WARNING (SyncWorker_0) [pycec] Not initialized. Waiting for init.
2022-06-24 10:09:20 ERROR (MainThread) [homeassistant.components.automation.hasp_p_8_b_all_page_8_displays_media_controls] Error rendering variables: ValueError: Template error: int got invalid input 'None' when rendering template '{%- set color = namespace() -%} {%- for entity in device_entities(haspdevice) -%}
  {%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
    {%- set color.source=entity -%}
  {%- endif -%}
{%- endfor -%} {%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}' but no default was specified
2022-06-24 10:09:20 WARNING (SyncWorker_0) [pycec] Not initialized. Waiting for init.
2022-06-24 10:09:20 WARNING (MainThread) [music_assistant.players.stream] Reconnect of player <IP_ADDRESS> detected, playback may be disturbed
2022-06-24 10:09:20 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 225, in serve_queue_stream
    await queue_stream.subscribe(client_id, audio_callback)
  File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 378, in subscribe
    assert client_id not in self.connected_clients, "Client is already connected"
AssertionError: Client is already connected
2022-06-24 10:09:20 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 225, in serve_queue_stream
    await queue_stream.subscribe(client_id, audio_callback)
  File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 378, in subscribe
    assert client_id not in self.connected_clients, "Client is already connected"
AssertionError: Client is already connected
2022-06-24 10:09:20 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 225, in serve_queue_stream
    await queue_stream.subscribe(client_id, audio_callback)
  File "/usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py", line 378, in subscribe
    assert client_id not in self.connected_clients, "Client is already connected"
AssertionError: Client is already connected
2022-06-24 10:09:21 ERROR (MainThread) [homeassistant.components.automation.hasp_p_8_b_all_page_8_displays_media_controls] Error rendering variables: ValueError: Template error: int got invalid input 'None' when rendering template '{%- set color = namespace() -%} {%- for entity in device_entities(haspdevice) -%}
  {%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
    {%- set color.source=entity -%}
  {%- endif -%}
{%- endfor -%} {%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}' but no default was specified
2022-06-24 10:09:21 ERROR (MainThread) [homeassistant.components.automation.hasp_p_8_b_all_page_8_displays_media_controls] Error rendering variables: ValueError: Template error: int got invalid input 'None' when rendering template '{%- set color = namespace() -%} {%- for entity in device_entities(haspdevice) -%}
  {%- if entity|regex_search("^light\..*_selected_foreground_color(?:_\d+|)$") -%}
    {%- set color.source=entity -%}
  {%- endif -%}
{%- endfor -%} {%- set brightness = state_attr(color.source, "brightness")|int / 255 -%} {%- set red=(state_attr(color.source, "rgb_color")[0] * brightness)|int -%} {%- set green=(state_attr(color.source, "rgb_color")[1] * brightness)|int -%} {%- set blue=(state_attr(color.source, "rgb_color")[2] * brightness)|int -%} {{ (red|bitwise_and(248)*256) + (green|bitwise_and(252)*8) + (blue|bitwise_and(248)/8)|int }}' but no default was specified
2022-06-24 10:09:21 WARNING (SyncWorker_0) [pycec] Not initialized. Waiting for init.

Keep in mind OSMC has > 60 patches over Kodi: https://github.com/osmc/osmc/tree/master/package/mediacenter-osmc/patches
It might be worth for the OP to test with a plain Kodi, and open an issue on the OSMC side if it actually works.

You can see the issue clearly in your log. The player connects multiple times

Keep in mind OSMC has > 60 patches over Kodi: https://github.com/osmc/osmc/tree/master/package/mediacenter-osmc/patches It might be worth for the OP to test with a plain Kodi, and open an issue on the OSMC side if it actually works.

That is indeed a good suggestion. I have been testing with a plain Kodi install on my Mac.

Keep in mind OSMC has > 60 patches over Kodi: https://github.com/osmc/osmc/tree/master/package/mediacenter-osmc/patches It might be worth for the OP to test with a plain Kodi, and open an issue on the OSMC side if it actually works.

I have a history in the "Kodi world" too years ago haha with a lot of helper add-ons and Skins.
I will check my version

2022-06-22 19:55:22.890 T:18388296    INFO <general>: Starting Kodi (19.4 (19.4.0) Git:20220302-e12e66e019). Platform: macOS x86 64-bit 2022-06-22 19:55:22.890 T:18388296    INFO <general>: Using Release Kodi x64 2022-06-22 19:55:22.890 T:18388296    INFO <general>: Kodi compiled 2022-03-03 by Clang 10.0.1 (clang-1<IP_ADDRESS>) for macOS x86 64-bit version 10.13 (101300) 2022-06-22 19:55:22.890 T:18388296    INFO <general>: Running on Apple Inc. MacBookPro16,2 with macOS 12.4 (Version 12.4 (Build 21F79)), kernel: Darwin x86 64-bit version 21.5.0 2022-06-22 19:55:22.890 T:18388296    INFO <general>: FFmpeg version/source: 4.3.2-Kodi

Doesn't work form me, either.
This is likely relevant
2022-06-24 13:28:17.922 T:15082   DEBUG <general>: CCurlFile::Open - File <http://<IP_ADDRESS>:8095/3e07dc52d8524db19b029cdf99c02937.flac> is a shoutcast stream. Re-opening

This is the behavior I observed with Kodi clients:
head request
head request
get request without icy metadata header
get request without icy metadata header
get request with icy metadata header
The client "sticks" at the last request and keeps playing but this all happens within 2 seconds so it's all very time sensitive.
Music Assistant want to start the stream once the client is connected (or multiple clients if multiple should receive the stream). The existing behavior (that works with all players except Kodi) is that it starts streaming audio chunks once the client is connected (GET request). In the HEAD request only the contenttype is shared.
Kodi tries to probe the file to receive additional details it is not going to get.
It should have read the headers telling it is content-type "audio-flac" and the fact that there's a chunked header tells Kodi not to do any range requests (which it does).
I'm assuming here Kodi wants to know more (duration perhaps?) and tries to fetch the file once to grab those details.
Once it actually gets through all hurdles and is playing, it plays amazingly well and even display what is playing thanks to the ICY metadata.
I don't know if this probing thingie is something only happening once. If so I could create a special static endpoint for the Kodi clients instead of the current randomly generate stream url (to invalidate any cache).
Another option is to be even more forgiving on the number of requests and timeout.
Big problem here is I can't differentiate between a misbehaving client and Kodi.
I don't want to delay the start of chunks streaming too much as it ill delay the entire experience. Imagine you have to wait seconds when you're seeking in a file etc.

The machine I'm testing with is local on my dev machine together with MA so very low latency. Maybe I should also test the additional latency of a Kodi client connected over the network

That's actually because ICY was added ;)

Yeah, I added it while I was fighting the Kodi issue. It was fun to do ;-)

so very low latency

On my lan, there is ~1sec between the first call and Kodi actually trying to play the stream

Oh well that is a lot.
What I also find strange is that we seem to hit the case where the old stream was not disconnected yet and the new request already came in:
https://github.com/music-assistant/music-assistant-lib/blob/master/music_assistant/controllers/streams.py#L378
Do you by any change know/remember if Kodi does the probing once for each file/url or at every request ?

If it doesn't come from library (as is the case here), it will probe each time, as far as I remember.

OK, thanks. So creating a static URL for the Kodi players makes no sense then.
I'm going to try one last workaround and that is to disconnect the previous session and accept a new incoming one when I receive duplicate requests from the same IP. Now it just throws an exception there causing Kodi to even retry more. Now I'll just feed the chunks that are ready for that client (I keep the previous chunk in memory)

OK, fingers crossed, last workaround implemented. I'm not happy with it but can live with it ;-)
For real I think the issue should be fixed in Kodi itself but if this workaround works its fine.
2022.6.6 just released with my final attempt to workaround the reconnecting Kodi player.
Please let me know if it works for you.
BTW: Do not expect fast response times. With all the reconnecting the Kodi player is really slow to respond on a new stream. If it is streaming, it works flawless and including metadata.

Working here!
Thanks so much for your work here!

it works just fine over here as well! thanks a lot!

Great!

@marcelveldt I'm still a KODI team member (not a dev though) and could forward the issue at hand of nobody else has by now. If I got it right, the main issue is that KODI does way too many requests to the URL even though the initial HEAD request indicated that this might not be possible. Is this somewhat correct?


initial use cases

Adding the initial list of use cases to open up discussion. Feedback is welcome.
Closes #55

I wonder if describing what Alice does not want might also help us.
Example: Alice does not want anyone to be able to read any personal information of her but still be able to log into her government services. (something like this)

Just a remark: Do we need to describe Alice a bit more? Is she a developer? "Alice wants her Solid Inbox...." this implies she knows Solid and maybe is a dev?

Merging as discussed in meeting . We can follow up and expand/improve this on issues and PRs.


Any GitHub instance support on KIE Sandbox

Currently KIE Sandbox users can integrate only with the official public GitHub instance - https://github.com
We should allow KIE Sandbox users to integrate with any GitHub instance. It means in the dialog bellow we do not hardcode the card to https://github.com

Once the above is implemented, it should be for KIE Sandbox users to paste tokens also from other github instances. Bellow is screenshot of the current problem with pasting tokens from custom github instances,

Please notice we have already similar ticket for GitLab support .

Thank you @tiagobento . It sounds reasonable to me allowing users to add 'Select provider' new cards via their browsers.

@tiagobento I updated the ticket description accordingly.


tests: logging: log_msg: Fix test after mpsc_pbuf changes

Test started to fail after updated in mpsc_pbuf. It was failing for two reasons:

Expected capacity was not updated after change in mpsc_pbuf which now has full capacity (does not use extra byte for empty vs full distinction).
Messages were claimed without freeing. It was faulty even before the update since mpsc_pbuf is single consumer so only one message can be claimed at a time. However, test was passing before unexpectedly.

Signed-off-by: Krzysztof Chruscinski<EMAIL_ADDRESS>

Fixing regressions introduced by #38777. https://github.com/zephyrproject-rtos/zephyr/pull/38777#issuecomment-1367436375

Hey thanks for the quick turnaround!


NSInvalidArgumentException BSGEventUploadOperation.m:112

Describe the bug
After upgrading from 6.2 to 6.9, we've been seeing unhandled crashes from a narrow set of users with the following stacktrace:
NSInvalidArgumentException: -[NSNull countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x20a654a00

0  CoreFoundation          ___exceptionPreprocess
1  libobjc.A.dylib         _objc_exception_throw
2  CoreFoundation          -[NSObject(NSObject) doesNotRecognizeSelector:]
3  CoreFoundation          ____forwarding___
4  CoreFoundation          ___forwarding_prep_0___
5  Runner                  +[BugsnagError errorFromJson:] (BugsnagError.m:119:9)
6  Runner                  -[BugsnagEvent stacktraceTypes] (BugsnagEvent.m:729:31)
7  Runner                  -[BSGEventUploadOperation runWithDelegate:completionHandler:] (BSGEventUploadOperation.m:112:67)
8  Runner                  -[BSGEventUploadOperation start] (BSGEventUploadOperation.m:177:5)
9  Foundation              ___NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__
10 Foundation              ___NSOQSchedule_f
11 libdispatch.dylib       __dispatch_block_async_invoke2
12 libdispatch.dylib       __dispatch_client_callout
13 libdispatch.dylib       __dispatch_continuation_pop
14 libdispatch.dylib       __dispatch_async_redirect_invoke
15 libdispatch.dylib       __dispatch_root_queue_drain
16 libdispatch.dylib       __dispatch_worker_thread2
17 libsystem_pthread.dylib __pthread_wqthread
18 libsystem_pthread.dylib _start_wqthread

This is strange because the line in BugsnagError.m checks for nil values:
    if (trace != nil) {
        for (NSDictionary *dict in trace) {
            BugsnagStackframe *frame = [BugsnagStackframe frameFromJson:dict];

            if (frame != nil) {
                [data addObject:frame];
            }
        }
    }

From my limited knowledge of Obj-C, nil does not necessarily equal NSNull and a stricter comparison may be required for trace != nil. Or, since the use case utilizes a custom stack trace (see below), stricter validation may be required on the custom stack trace method.
Steps to reproduce
I maintain the bugsnag_flutter library (Flutter is a cross-platform mobile framework), which reports errors to the native SDK with an assigned a custom stacktrace for handled in-app events. This is done so that the errors receive the richness of the native SDK reporting (device version, user, breadcrumbs, etc). This is how the stack trace is assigned:
    NSException *exception = [NSException exceptionWithName:call.arguments[@"name"]
                                                     reason:call.arguments[@"description"] userInfo:nil];
    [Bugsnag notify:exception block:^BOOL(BugsnagEvent *event) {
      [event attachCustomStacktrace:call.arguments[@"stackTrace"]
                           withType:@"flutter"];
      [event addMetadata:@{@"Full Error": call.arguments[@"fullOutput"]} toSection:@"Flutter"];
      [event addMetadata:@{@"Context": call.arguments[@"context"]} toSection:@"Flutter"];
      if (call.arguments[@"additionalStackTrace"]) {
        [event addMetadata:@{@"StackTrace": call.arguments[@"additionalStackTrace"]} toSection:@"Flutter"];
      }

      return YES;
    }];

I'm still trying to figure out the sort of error that causes this failure and will provide better repro steps if/when they can be determined reliably.
Environment

Bugsnag version: 6.9.4
CocoaPods version: 1.10.1
Carthage version (if any): n/a
iOS/tvOS/macOS version(s):14.4.2
Simulator or physical device: Physical
Xcode version: 12.4
Swift version (if applicable): n/a

The unhandled errors are universally reported immediately after app start, which would indicate that custom stack trace errors that are stored before the next app launch (like in the event of a simultaneous OOM) are not stored with the withType argument.

Thanks for the detailed report and follow up! 👍
It appears that the crash is happening when trying to send an error that was stored by an earlier version (like 6.2) of Bugsnag. More recent versions (6.8.2 onwards) would throw an exception in -[BugsnagEvent attachCustomStacktrace:withType:] if passed an NSNull value and not get as far as storing the error.
bugsnag_flutter should check for nil and NSNull and prevent them being passed them to -[BugsnagEvent attachCustomStacktrace:withType:] since the API is defined as accepting a nonnull NSArray * (it must not be nil or another type).
Something like this:
id stacktrace = call.arguments[@"stackTrace"];
if ([stacktrace isKindOfClass:[NSArray class]]) {
   [event attachCustomStacktrace:stacktrace withType:@"flutter"];
}

It's fine to pass NSNull values to the addMetadata:... APIs.

+[BugsnagError errorFromJson:] will be fixed in a similar fashion to https://github.com/bugsnag/bugsnag-cocoa/pull/1141 although we're going to make some further changes to improve the safety for other values at the same time.

Fixed in v6.10.1


Include File Locking

Sometimes, some game files are removed from the GOG.com library by the publishers for good reasons and sometimes, they are dropped to the detriment of the end-user.
A legitimate removal might be removing the previous version of an installer when a game is updated to a new version.
A detrimental removal might be the publisher removing the Linux installer for a game (even though it works fine) or a game extra (ex: the soundtrack).
Given the above case, the tool should allow end-users to lock certain files in the manifest and make them non-removable during future manifest updates, without having to manually edit the manifest and actions file each time.

Implemented in:
https://github.com/Magnitus-/gogcli/commit/20151a637675f6cf57fab65e4efb7e9f095bc1de
https://github.com/Magnitus-/gogcli/commit/8a4d1392c492bd97a3656be702f6742ee26903a1
https://github.com/Magnitus-/gogcli/commit/54023cc1377448e3929c74f76a2e776d828f3807
https://github.com/Magnitus-/gogcli/commit/e9efa0098d3dbc983882adf91b4fbc1942e18f0f


Private State Token Issuer Request - Chromium PST Demo Issuer

Issuer Name
Chromium PST Demo Issuer
Origin
https://trusttoken.dev/
Contact Email
<EMAIL_ADDRESS>Key Commitment Endpoint URL
https://trusttoken.dev/tt/k/
Purpose
Demo Issuer for testing Private State Tokens features.
Disclosure and Acknowledgement

I understand the technical restrictions on key rotation frequency of 60 days in the PST API.
I understand that my issuer registration will be valid for a period of six months after the key commitment is accepted, and that I will need to re-register in this repository following that six-month period.
I understand that in the future renewing my registration for this API may have additional requirements, to reduce the risk of abuse by token issuers.

Key Commitment endpoint confirmed, adding with an expiry of<PHONE_NUMBER> (November 24th, 2023).


eks-distro-base: fix presubmit registry sidecar

Add proper readiness/liveness probes.  Fix command + args.  Hardcode image_repo to point to local registry
/hold
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/unhold


Model response status

Since the HTTP Response status code isn't in the headers dictionary it needs to be modeled separately as response.http_status.
Fixes #24

This lgtm but I was additionally wondering, if it would make sense to have statuses explicitly in a table as well?


Include template name in project details panel

I've been asked how people can tell (without previewing or opening the editor) which template they have used for each project listed in their workspace. At the moment, the only way you can tell is by looking at the icon next to the project name in the workspace tree. This isn't accessible.
It would be good to add 'Template: Xerte Online Toolkits/Bootstrap' to the project details panel

@FayCross I'll add that (as I am messing with the Project details anyway)
And good idea, I think it would be good to add the name of the subtemplate (if used). (There is no other way to see wich sub template was used). Agree?

@torinfo thanks, including subtemplate makes sense too.

@FayCross @torinfo agree its a good idea to show the template name and sub template name but I don't think it needs to be prefixed by Xerte Online Toolkits. I think that's a bit redundant and as we know most of the time people refer to just Xerte  not Xerte Online Toolkits. Also in my experience sub-template names can be quite long in some cases so I think it would be neater and not necessary to include that prefix. Or am I missing something?

@FayCross @torinfo just to add to this I would suggest the following format:
Template: Xerte Online Toolkit
Template: Bootstrap
Template: Decision Tree
Template: Sub Template Name
But is there a question/issue about where this is picked from? e.g. isn't there variation where the names have been customised via management like Bootstrap/Site Template rather than just Bootstrap.
Also does the sub template name need to be Template: Xerte Online Toolkit/Sub Template Name e.g. to indicate the parent.
And what happens when a sub template is removed - what happens to the name then?

@ronm123 Good questions:
About where to take the name from. Probably the customised name?
About sub templates, I think it would be good to name parent as well.

@ronm123 I don't think it should be prefixed by Xerte Online Toolkits. I meant it should say Template: Xerte Online Toolkit or Template: Bootstrap (I accidentally added an s to the end of the XOT template name!) If we could start over it would be a lot less confusing if both XOT & Bootstrap templates were named differently!
We don't use sub-templates so can't comment on best way to show these.

@FayCross yeah sorry I guessed after my first reply that you probably meant that. Also yes agree if we could start over it would be simple and I think one of the most confusing bits of that is the Xerte Online Toolkits Xerte Online Toolkit template! I might be remembering wrongly but I also seem to recall that the name of the Bootstrap template was named that way rather than simply e.g. Website template due to political issues at Nottingham and the new CMS at the time. But anyway yes @torinfo the customised name from the db would be good because then at least it can be changed once people see this in action. e.g. some might be inclined to change the name of the Xerte Online Toolkit template to just XOT especially where long sub template names are in use.

Fixed in https://github.com/thexerteproject/xerteonlinetoolkits/commit/6da64a10bd9a23c262fa273b1bdc8e33ed4c0812


Added support for not including all fields when using the series helper

Fixes #302.

I don't think the PyPy error is unique to this pull request...

Thanks for contributing! Would you mind adding a simple test, such that the NameError you raise is caught?

Is there anything else that is needed?


Safely expose SimdArray for generic usage of Simd<T>

Currently SimdArray is a private trait that controls what types can be used inside of Simd<T>. But given that it is a private type is it impossible to make generalized apis over say, f32 and f64. This is incredibly frustrating. (see this reddit comment from this reddit thread for an example of this frustration).
If SimdArray used the sealed trait pattern instead of making it private, it would be possible to use it generically without allowing implementations outside of the crate.
The pattern is as follows,
mod private {
    // must be pub, but won't be reachable from outside the crate
    pub trait Seal {}
}

// this is for ease of use inside the crate (optional)
pub(crate) use self::private::Seal;

// Now no one can implement `SimdArray` unless they also implement `Seal`
// but they can't access `Seal` because it is logically private
// They can still use `SimdArray` as a bound though, so this allows generic usage of `Simd<T>`
pub trait SimdArray: Seal {}

This is similar to #232, but now there is a way forward

This has been done in #259, so close


:memo: add badges

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@f92d19e). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff            @@
##             main        #2   +/-   ##
========================================
  Coverage        ?   100.00%
========================================
  Files           ?         1
  Lines           ?        13
  Branches        ?         0
========================================
  Hits            ?        13
  Misses          ?         0
  Partials        ?         0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f92d19e...c38655f. Read the comment docs.


Require relationship type in associations

Generally you're specifying this almost all the time and it sometimes causes problems when you don't specify it.  We should make this a required argument.  If you want to have the association match any type you would give false

Huge +1 to this


Looking forward to Part 3

Hey Jenna! Thank you for all the work so far, just wanted to ask when will part 3 be out? I've been following the tutorial and I kinda need part 3 to finish my work 😅

That would be great! Really appreciate it


Update README.md

@robinv85  antd has more components available than the antd mobile. Some of the components in the antd mobile are specific to mobile screens, which can look slightly off when you view them in larger screen size (accordion for example). I just started using the regular version and some of the components look fine regardless of screen size. Maybe there are performance differences between the two libraries. In general I  guess we should've been more clear about our tech stack from the start, as it seems too late to redo what's done if we want to stick with just one library....

@anniegiang yeah I guess it's great that you added this in the documentation.
We started during hackathon with bootstrap and the outdated desktop designs, then later tried some stuff and were told to focus on mobile. I think ant-mobile was mostly added for the "drawer menu" component and everything else doesn't really matter that much. Except for the icons from Material perhaps. So ideally we now have enough information to make the right decisions about this.
Probably Webpack will also optimize the bundles anyway with tree shaking for stuff we don''t use from libraries.


fsfsdfsdfsdfdfssdfdssdfsdfdfs

myb balls ar frey

The whole discord server is seeing you lmao

The whole discord server is seeing you lmao

lmao


[MLS Spec change] Add directions for newly required aasvg tools to README.md (#621)

Link to the exact changes
https://github.com/mlswg/mls-protocol/pull/621
Description of the changes

Describe in README.md how to fetch the now required aasvg (ASCII art to SVG) and svgcheck tools.

Editorial.


Feature request: Average over channels

Hello!
(This issue has been raised in the mne_analysis mailing list)
Describe the problem
There is currently no way to average signals over channels on a Raw, Epochs or Evoked object easily. One can average signals over channels with the "combine" parameter in some visualisation options but it is not possible to modify a Raw, Epochs or Evoked instance by performing an average over channels.
Describe your solution
One solution could be to add a new method to Raw, Epochs and Evoked enabling to combine channels (with mean or median options for example). It could for example take as one of the parameters a dictionary where each ROI (new pseudo-channels) would be associated with a list of channels to perform the combination on. This method could also eventually return the standard deviations in order to compute confidence intervals...
Describe possible alternatives

One alternative is to use for example the plot_image method with the "combine" parameter, but it only enables to plot signals and does not return a modified instance of Epochs.
Another alternative is to extract data with get_data, perform the operation with numpy.mean, recreate channel information with pseudo-channels thanks to create_info and recreate a Raw object from a numpy array with RawArray.

Additional context
No additional context.
Please let me know if that makes sense?
Many thanks!
Johann

I would use this feature if it existed. If you are going to create this I would have the function take a dictionary similar to plot image... group_by=dict(Left_ROI=[1, 2, 3, 4], Right_ROI=[5, 6, 7, 8])

Good idea thank you @rob-luke.
Do you think it would be better to have this doing only an average (in which case we could have an "average_channels" method) or is it better to also have the possibility to get the median instead (in which case a "combine_channels" method would be more appropriate I guess)?

Be careful that you then need to discard channel locations for an average channel

my two cents:

combine_channels(..., method='mean') with default mean and ability to take a few keyword strings (mean, median, std) that resolve to numpy functions, or a callable.
I'd prefer an API more like combine_channels(left_roi=(1, 2, 3), right_roi=(4, 5, 6), method='median') rather than having to wrap the ROIs into a dict (think of how dict.update() works). Not sure if that presents difficulties in arg parsing or documentation though...
I'm assuming any channels not provided in the ROIs are simply dropped?  Seems like they should be, though maybe there are use cases I'm not aware of where you'd want a mix of original channels and combined channels?

Thanks @drammock.

I like the idea of a combine_channels method which defaults to mean.

Not sure what you mean with the dict.update(), could you please give more details? I think a dict can let more freedom to users as they could create as many ROIs as they want, but also give them custom names ('left_roi' and 'right_roi' being possibilities). I feel like it could become very complex with a lot of ROIs without a dict... I was thinking of it the same way one can use an evoked_dict if that makes sense.

Dropping channels not provided would make sense. With a dict it would be possible to specify a ROI as being only one channel if someone wants to keep original channels. Maybe in some cases users may want to keep for example an EEG reference channel as is. I'm working mainly with fNIRS at the moment and ROIs make probably more sense with it as we often don't have proper locations (with eg. 10-20 system).

* Not sure what you mean with the `dict.update()`, could you please give more details?

dict.update() allows but doesn't require a dict argument; you can pass the new key/value pairs as parameters.  Here's an example:
>>> foo = dict(a=1)
>>> foo
{'a': 1}
>>> foo.update(b=2, c=3, d=4)  # can pass each new key/value as a parameter
>>> foo
{'a': 1, 'b': 2, 'c': 3, 'd': 4}
>>> foo.update(dict(e=5, f=6))  # can pass a dict
>>> foo
{'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5, 'f': 6}

My example with left_roi and right_roi was not meant to suggest that those two (and only those two) ROI names should be possible. They were just examples.

* it would be possible to specify a ROI as being only one channel if someone wants to keep original channels.

I'm still not 100% clear that we should support this use case, but it seems like if we want to allow a mix of single channels and averaged ROI "channels", then a boolean drop=False should be sufficient, and the function should leave any channels not in the ROIs untouched.  Under your proposal, if a user wanted to keep say 20 single channels, they would need 20 extra dict keys or would need to pass 20 extra parameters.
To anticipate the worry of "what if they want to keep 20 single channels, create ROIs out of another 20, and drop all the rest?"  In that case, they can use existing functionality to do the dropping step first before creating the ROIs.

Alright, good point. Thanks for the explanation.
I guess I can start working on this, and I'll see how it goes. It would be my first contribution to MNE but I'm happy to do it as I think it will be a good learning process, if you're okay with it?

Yes! We are very welcoming of new contributors, and will happily provide reviews and guidance on your first pull request :)


Out-RsCatalogItem not generating correct XML for data sources

When using Out-RsCatalogItem to export a data source, the API is not returning expected/correct XML definition. You cannot deploy an exported dataset back to Reporting Services without the proper formatting. Reporting Services does not see it as a valid data source.
Below are comparisons of RDS definitions:
Exported RDS via SSRS API (GetItemDefinition):
<DataSourceDefinition>
	<Extension>SQL</Extension>
	<ConnectString>Data Source=(local);Initial Catalog=AdventureWorks2014</ConnectString>
	<UseOriginalConnectString>False</UseOriginalConnectString>
	<OriginalConnectStringExpressionBased>False</OriginalConnectStringExpressionBased>
	<CredentialRetrieval>Store</CredentialRetrieval>
	<WindowsCredentials>True</WindowsCredentials>
	<ImpersonateUser>False</ImpersonateUser>
	<UserName>domain\user</UserName>
	<Enabled>True</Enabled>
</DataSourceDefinition>

Definition of shared data source as created in Visual Studio:
<?xml version="1.0" encoding="utf-8"?>
<RptDataSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="dsrcAW2016">
	<ConnectionProperties>
		<Extension>SQL</Extension>
		<ConnectString>Data Source=(local)\elektra;Initial Catalog=AdventureworksDW2016CTP3</ConnectString>
		<IntegratedSecurity>true</IntegratedSecurity>
	</ConnectionProperties>
	<DataSourceID>dc94beb9-b13c-4219-ae9e-ea5033017691</DataSourceID>
</RptDataSource>

This looks like a promising place to derive solution code from: MSSQL Tips article

I tried using the output from the referenced Gallery Solution, but ended up with the same error.  I ran that script and then replaced the ReportingServicesTools data source xml content.  Not really sure what the issue is.
error.txt

Ultimately the issue is that Reporting Services isn't exporting the proper XML format. I compared the XML of a valid data source versus one exported. Here's one exported via the gallery solution method (exported rds doesn't work):
Good example:

SQL
Data Source=(local);Initial Catalog=AdventureWorks2014
true

3d7902c5-9aba-4cb0-b59d-d2ae2c205721

Bad export:

SQL
Data Source=.\elektra;Initial Catalog=ReportServer;
Store
False
False
True

Using that both of those as input doesn't seem to work for me either the same error or one complaining about invalid xml schema - maybe something to do with my environment.  The method from this site does work:  http://bretstateham.com/extracting-ssrs-report-rdl-xml-from-the-reportserver-database/
See contentvarchar column in this query.  I modified it to only show datasources.

--The first CTE gets the content as a varbinary(max)
--as well as the other important columns for all reports,
--data sources and shared datasets.
WITH ItemContentBinaries AS
(
  SELECT
     ItemID,Name,[Type]
    ,CASE Type
       WHEN 2 THEN 'Report'
       WHEN 5 THEN 'Data Source'
       WHEN 7 THEN 'Report Part'
       WHEN 8 THEN 'Shared Dataset'
       ELSE 'Other'
     END AS TypeDescription
    ,CONVERT(varbinary(max),Content) AS Content
  FROM ReportServer.dbo.Catalog
  WHERE Type IN (5,8)
),
--The second CTE strips off the BOM if it exists...
ItemContentNoBOM AS
(
  SELECT
     ItemID,Name,[Type],TypeDescription
    ,CASE
       WHEN LEFT(Content,3) = 0xEFBBBF
         THEN CONVERT(varbinary(max),SUBSTRING(Content,4,LEN(Content)))
       ELSE
         Content
     END AS Content
  FROM ItemContentBinaries
)
--The outer query gets the content in its varbinary, varchar and xml representations...
SELECT
   ItemID,Name,[Type],TypeDescription
  ,Content --varbinary
  ,CONVERT(varchar(max),Content) AS ContentVarchar --varchar
  ,CONVERT(xml,Content) AS ContentXML --xml
FROM ItemContentNoBOM
/*WHERE name = 'dba_rep'*/

@sqlchicken and @propellor I have made changes to Write-RsCatalogItem such that it is now able to create data source based on the DataSourceDefinition xml. Can you please try the new version of this function and tell me what do you think about it? I was wondering whether this change would be sufficient to close this issue.

@parthsha, thanks for that update.  I have tested again against SSRS 2012 and while there is improvement in the data source, the reports are broken.

The data source is now created, however, only the name remains.  Server/Provider info is lost.  I expect credentials to be reset, but usually that information should transfer.

Report files are no longer XML text files.  They show as some type of Asian character set in text editors, perhaps Chinese. 믯㲿砿汭

Thanks again for working on this.

When you say Server/Provider Info is lost, what do you mean? I see the connection string (see  and the type of data source it is . Is there something else you are looking for? The credentials will be reset but that is more for security purposes than functional.

Yes those two properties you mention do not make it into the uploaded data source.  All I get is a data source with the correct name.

@propellor I made a silly error. I am sorry about that. Could you please try again?

It’s still not working properly. Still not seeing valid definition for the exported items.
From: Parth Shah<EMAIL_ADDRESS>Sent: Wednesday, January 25, 2017 3:41 AM
To: Microsoft/ReportingServicesTools<EMAIL_ADDRESS>Cc: Jorge Segarra<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [Microsoft/ReportingServicesTools] Out-RsCatalogItem not generating correct XML for data sources (#9)
I also fixed the issue with report and shared data set files not showing up as valid xml. They should now appear like how they used to.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/ReportingServicesTools/issues/9#issuecomment-275049824, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMc1LHlFhcmwlQT39Kos5s8VMF1Ip_dcks5rVwqwgaJpZM4KsaET.

@sqlchicken the XML for data source is not what you have mentioned above. I was trying to solve the issue of being able to upload the data source that was downloaded by the PowerShell scripts. I will try looking into getting the correct XML as soon as possible.

This is still broken as of 2021-01-04.

This is still broken as of 2021-01-04.


Emmet falsely suggesting completion with hyphen in parent tag

hi , i cannot use the emmet in .vue file after i updated the  vccode today and i already has wirte "emmet.syntaxProfiles": {
"vue-html": "html",
"vue": "html"
} in setting json.

That's a valid bug, thanks @johnlindquist
@zouhangwithsweet You need to use emmet.includeLanguages setting instead from VS Code 1.15 version onwards

Thanks, its working now.  But i cannot use tab to emmet code forever. That's too bad. its time to use enter now!!

@zouhangwithsweet You can use tab for emmet in the latest Insiders. Download it from https://code.visualstudio.com/insiders and set emmet.triggerExpansionOnTab to true.

@sergeche The same problem occurs in the atom plugin as well.

When providing <foo-bar>Hello</foo-bar> as input to the extract-abbreviation module with the pos right after Hello, the extracted abbreviation is foo-bar>Hello instead of just Hello
Where as if the same without the hyphen is provided, then the extracted abbreviation is indeed Hello.
I was able to narrow it down to https://github.com/emmetio/extract-abbreviation/blob/v0.1.2/lib/is-html.js#L122 where the definition of identifier is to contain either  : or a alpha-numeric char.
- fails this test.
How do you suggest we tackle this?

@ramya-rao-a this test should also include - as well. Published<EMAIL_ADDRESS>

Thanks @sergeche
@johnlindquist Am curious, is it common to write html with - in this way?

Yes, it’s very common, especially for Web Components

Exploring on @sergeche:
Yes, it is. When you obey to the standard, tags with a hyphen are the only tags that can be introduced custom. So when you want to create a new tag for your maintenance message and you want to give it unique properties, you would have to call it <j1o-maintenance></j1o-maintenance> (j1o is an acronym for jens1o here)

Thanks @sergeche and @jens1o, I have added this issue to the July Recovery plan

Fix is both in master and the release branch

VS Code 1.15.1 is released and it has the fix to this issue


use Custom Code Snippets

Hello when working with server files or better with property Build Action = Compile,
there is no chance to use any code snippet at all.
For example right click Insert Code Snippet Ctrl+K, Ctrl+X is not available.

This is a duplicate of #158 , which is currently in progress.


Update Composer dependencies (2020-11-06-00-07)

Visual regression test passed!
View the visual regression test report


Build or sanitycheck fixes for Openisa rv32m1/rv32m1_vega_ri5cy board

A few fixes to get the rv32m1_vega_ri5cy to pass sanitycheck completely.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@ce4b282). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #14263   +/-   ##
=========================================
  Coverage          ?   52.04%
=========================================
  Files             ?      307
  Lines             ?    45489
  Branches          ?    10540
=========================================
  Hits              ?    23676
  Misses            ?    17017
  Partials          ?     4796

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce4b282...6041f76. Read the comment docs.


Revert "Merge pull request #23829 Deprecate COD-Kotlin DSL combination"

Reverts https://github.com/gradle/gradle/pull/23829 because the alternative is not stable yet: Project Isolation

@bot-gradle test and merge

@bot-gradle cancel

I've triggered a build for you.


The I/O operation has been aborted because of either a thread exit or an application request. [Build 18362]

Your Windows build number: Windows 10 Enterprise 10.0.18362 Build 18362.778

What you're doing and what's happening: Clicking Ubuntu 18.04 LTS from start menu. I then get the following in the Ubuntu Window:
The I/O operation has been aborted because of either a thread exit or an application request. Press any key to continue...

What's wrong / what should be happening instead: Ubuntu on WSL was working fine earlier today. I was using it and starting a Kafka server and it froze. I pressed ctrl-C and ctrl-\ and it was still frozen. I then closed the Ubuntu window and now every time I open it I am getting the above message. I have tried closing and opening multiple times, still getting same message.

I was unable to collect detailed logs, as this is a corporate company computer and I do not have administrator access. Let me know if there are any other logs or dumps I can try to send.
Any help is appreciated. Thank you!

After running Windows Update and updating to 18362.836, Ubuntu seems to be working fine now.

What seems to cause this issue is Java filling up the memory on the computer. This then causes Ubuntu to crash. After it crashes, Ubuntu will not work properly until the computer is restarted.


cgo: pass -gnu11 everywhere

I've switched LXC over to using -gnu11 by default since our lowest supported compiler is gcc 4.8 (same as kernel) which does have full support for it. This allows us to use for-loop initial declarations and other niceties that make a lot of sense. However, if that flag is not explicitly passed we might regression builds. So always pass it.

Users already hit this issue with the new network retrieval code that makes use of for-loop initial declarations.


Migration problem with multiple DbContexts

My scenario: I'm using EF 7.0.0-rc1-final, I have 2 class libraries with 2 dbcontexts, one of them use IdentityDbContext, and each class library has a Migrations folder for each dbcontext, and an method for seeding data.
When I call 2 seeding data methods in Startup.cs file, I got this error message

DefaultUser class for seeding a new user.
public class DefaultUser
    {
        private AccountDbContext _context;
        private UserManager<ApplicationUser> _userManager;

        public DefaultUser(AccountDbContext context, UserManager<ApplicationUser> userManager)
        {
            _context = context;
            _userManager = userManager;
        }

        public DefaultUser()
        {

        }

        public async Task InitializeDefaultUser(IServiceProvider serviceProvider)
        {
            var context = serviceProvider.GetService<AccountDbContext>();

            if (context.Database == null)
                return;

            await context.Database.MigrateAsync();

            if(await<EMAIL_ADDRESS>== null)
            {
                // Add a user
                var newUser = new ApplicationUser()
                {
                    UserName = "abc",
                    Email =<EMAIL_ADDRESS>                };

                await _userManager.CreateAsync(newUser, "password");
            }
        }
    }

AccountDbContext
public class AccountDbContext : IdentityDbContext<ApplicationUser>
    {
    }

Startup.cs
DefaultUser defaultUser = new DefaultUser();
defaultUser.InitializeDefaultUser(app.ApplicationServices).Wait();

Register services for 2 dbcontext in Startup.cs
services.AddEntityFramework()
                .AddSqlServer()
                .AddDbContext<MediaDbContext>(options =>
                {
                    options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"]);
                });
            services.AddEntityFramework()
                .AddSqlServer()
                .AddDbContext<AccountDbContext>(options =>
                {
                    options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"]);
                });

            services.AddScoped<MediaDbContext>();
            services.AddScoped<AccountDbContext>();

When I tried to apply migration for AccountDbContext, I got this error message

You trim the code in Startup.cs down to the following and everything will work:
services.AddEntityFramework()
    .AddSqlServer()
    .AddDbContext<MediaDbContext>(options =>
    {
        options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"]);
    })
    .AddDbContext<AccountDbContext>(options =>
    {
        options.UseSqlServer(configuration["Data:DefaultConnection:ConnectionString"]);
    });

The specific line that was causing your issue was explicitly registering the contexts as scoped. AddDbContext will put your context in the services with all the logic to flow the required services into them. Your explicit call to AddScoped lacks any of this logic, and because your context does not expose a constructor that takes an IServiceProvider (and passes it to the base constructor) EF does not get the services required from DI.

I removed AddScoped, and add IServiceProvider to the constructors of 2 sample data classes, and call them in Startup.cs.
MediaSampleData.cs
private MediaDbContext _context;

public MediaSampleData(IServiceProvider serviceProvider)
{
        _context = serviceProvider.GetService<MediaDbContext>();
}
public async Task InitializeMediaSampleData()
{
        if (_context.Database == null)
                return;

        await _context.Database.MigrateAsync();

        // add data
}

DefaultUser.cs
private AccountDbContext _context;
private UserManager<ApplicationUser> _userManager;

public DefaultUser(IServiceProvider serviceProvider)
{
        _context = serviceProvider.GetService<AccountDbContext>();
}
public async Task InitializeDefaultUser()
{
       if (_context.Database == null)
                return;

       await _context.Database.MigrateAsync();

      // add default user data
}

Startup.cs
MediaSampleData mediaSampleData = new MediaSampleData(app.ApplicationServices);
mediaSampleData.InitializeMediaSampleData().Wait();
DefaultUser defaultUser = new DefaultUser(app.ApplicationServices);
defaultUser.InitializeDefaultUser().Wait();

When I run the application, I got this exception
System.AggregateException was unhandled by user code
  HResult=-2146233088
  Message=One or more errors occurred.
  Source=mscorlib
  StackTrace:
       at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
       at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
       at System.Threading.Tasks.Task.Wait()
       at HuyTranPhotos.PublicWebsite.Startup.Configure(IApplicationBuilder app) in C:\Users\huytr\Documents\Visual Studio 2015\Projects\HuyTranPhotos\HuyTranPhotos.PublicWebsite\Startup.cs:line 149
       at HuyTranPhotos.PublicWebsite.Startup.ConfigureDevelopment(IApplicationBuilder appBuilder) in C:\Users\huytr\Documents\Visual Studio 2015\Projects\HuyTranPhotos\HuyTranPhotos.PublicWebsite\Startup.cs:line 93
  InnerException:
       HResult=-2146233079
       Message=The connection was not closed. The connection's current state is connecting.
       Source=System.Data
       StackTrace:
            at System.Data.ProviderBase.DbConnectionClosedConnecting.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
            at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
            at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
            at System.Data.SqlClient.SqlConnection.OpenAsync(CancellationToken cancellationToken)
         --- End of stack trace from previous location where exception was thrown ---
            at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
            at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
            at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
            at Microsoft.Data.Entity.Storage.RelationalConnection.<OpenAsync>d__32.MoveNext()
         --- End of stack trace from previous location where exception was thrown ---
            at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
            at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
            at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
            at Microsoft.Data.Entity.Storage.Internal.SqlServerDatabaseCreator.<ExistsAsync>d__13.MoveNext()
         --- End of stack trace from previous location where exception was thrown ---
            at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
            at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
            at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
            at Microsoft.Data.Entity.Migrations.HistoryRepository.<ExistsAsync>d__26.MoveNext()
         --- End of stack trace from previous location where exception was thrown ---
            at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
            at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
            at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
            at Microsoft.Data.Entity.Migrations.Internal.Migrator.<MigrateAsync>d__11.MoveNext()
         --- End of stack trace from previous location where exception was thrown ---
            at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
            at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
            at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
            at HuyTranPhotos.MediaManagement.Data.MediaSampleData.<InitializeMediaSampleData>d__2.MoveNext() in C:\Users\huytr\Documents\Visual Studio 2015\Projects\HuyTranPhotos\HuyTranPhotos.MediaManagement.Data\MediaSampleData.cs:line 26
       InnerException:

Can you share the complete contents of MediaSampleData.cs so that we can see what it is doing on Line 26 (where the exception is getting thrown) - this is the kind of thing you might see if you try to run two operations concurrently on the same context instance.

The complete code of MediaSampleData.cs
public class MediaSampleData
    {
        private MediaDbContext _context;

        public MediaSampleData(IServiceProvider serviceProvider)
        {
            _context = serviceProvider.GetService<MediaDbContext>();
        }

        public async Task InitializeMediaSampleData()
        {
            if (_context.Database == null)
                return;

            await _context.Database.MigrateAsync();

            if (! await _context.AlbumCategories.AnyAsync())
            {
                var cat1 = _context.AlbumCategories.Add(
                    new AlbumCategory
                    {
                        Name = "wedding",
                        Description = "wedding photos"
                    });

                await _context.SaveChangesAsync();
            }
        }
    }

That still looks like a partial listing, you must have some using statements at the top of the file. I need the full listing to line up line numbers in the exception details with your code.

I updated the code above with using statements.

Update: even if i use just only 1 dbcontext (MediaDbContext), the exception still occur.

@huytnd can you share your project, or a complete code listing of you model (MediaDbContext and the entity classes), so that I can try and reproduce this issue.

Closing as we have not heard back with requested details.


fix issue converting values to custom type pointers

Codecov Report
Patch coverage: 100.00% and project coverage change: +0.08 :tada:

Comparison is base (32a7f6a) 78.64% compared to head (59a27fa) 78.72%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2585      +/-   ##
==========================================
+ Coverage   78.64%   78.72%   +0.08%
==========================================
  Files         630      628       -2
  Lines       51506    51410      -96
==========================================
- Hits        40507    40474      -33
+ Misses       9013     8957      -56
+ Partials     1986     1979       -7

Flag
Coverage Δ

go-1.15-386
78.69% <100.00%> (+0.01%)
:arrow_up:

go-1.15-amd64
78.69% <100.00%> (+0.03%)
:arrow_up:

go-1.16-386
78.69% <100.00%> (?)

go-1.17-386
78.67% <100.00%> (+<0.01%)
:arrow_up:

go-1.18-amd64
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

util/gconv/gconv_convert.go
90.20% <100.00%> (+1.06%)
:arrow_up:

... and 6 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Implementing UART connection

Hello, I'm new to this.
With Arduino UNO, there are TX and RX pins for me to establish UART connection.
Which pins can I use to for TX and RX? Thanks.

Found the solution to my own issue,
This is a comment from banggood that has helped me:
A "standard" ESP32 has more pins, the default pins are 3 (Rx) and 1 (Tx) for Serial(0), 9 (Rx) and 10 (Tx) for Serial1, and 16 (Rx) and 17 (Tx) for Serial2. As you can see, with the limited number of pins on this TTGO board, none of them are there. But the good news is that the "Serial.begin" function has an option to change the pins! By using "Serial2.begin(9600, SERIAL_8N1, 25, 26);" you have the Serial2 port on pins 25 (Rx) and 26 (Tx). I tested this today, it's working like a charm!. It's NOT working on pins 37 and 38 (and maybe other pins), but it IS working on pins 25, 26, 27 !!!

Notice that GPIO pins 34 to 39 are input only, so they can be used for RX but not for TX.

Notice that GPIO pins 34 to 39 are input only, so they can be used for RX but not for TX.

Please, There is a default pins to Serial2 or Serial1 on this board?
I´m try to use it as MIDI controller using MIDI.h on IDE Arduino. However I dont get define this pins (25, 26 or 27) to Serial to be used by MIDI.h library.
I try
`struct Serial2MIDISettings : public midi::DefaultSettings
{
static const long BaudRate = 31250;
static const int8_t RxPin  = 25;
static const int8_t TxPin  = 26;
};
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial2, MIDI, Serial2MIDISettings);`
but not works. Anybody could help me?
Thanks

I'm facing similar problems using the TTGO-T Display board when using MIDI, WiFi and the display. I can not use the display at the same time I use MIDI. The following part works (I know, defining Serial2 is reduntant) but the display stops when it is called.
If using serial1 the board crashes. I'd love to use ths board for a MIDI-application WITH the display. I can only use it to send notes if I use AplleMIDI, but I'd love to use DIN-MIDi.
Anybody out there with a hint?
I also use those libraries:
#include <SPI.h>
#include <TFT_eSPI.h>
//
TFT_eSPI tft = TFT_eSPI();

Andf this is the code:
struct SerialMIDISettings : public midi::DefaultSettings {
  static const long BaudRate = 31250;
  static const int8_t RxPin = 13;
  static const int8_t TxPin = 22;
};
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial2, MIDI1, SerialMIDISettings);
// MIDI_CREATE_INSTANCE(SoftwareSerial, midiSerial, MIDI);
void setup_MIDI() {
  Serial.println("setup_MIDI debug 00");
  Serial2.begin(31250, SERIAL_8N1, 13, 22);
  // midiSerial.begin(31250); // MIDI baud rate
  // DIN_MIDI.begin(MIDI_CHANNEL_OMNI);

   MIDI1.begin(MIDI_CHANNEL_OMNI); // Listen to all channels

  // MIDI.turnThruOff(); // Disable MIDI thru
  //
  // Send MIDI on message
  Serial.println("setup_MIDI debug 01");
  MIDI1.sendNoteOn(60, 127, 1);  // Note On, C4, velocity 127, channel 1
  delay(500);
  // Send MIDI off message
  MIDI1.sendNoteOn(60, 0, 1);  // Note Off, C4, velocity 127, channel 1
  Serial.println("setup_MIDI debug 02");
}

Just used Serial and that works. So it seems the board (or one of the display libraries) use Serial1 and/or Serial2.
Need to check out how to get the debug Serial-output to a different port.
This works for display AND DIN-serial-output:
To keep my code (more or less) clean I set a link to
setup_MIDI();
inside
void setup(){}
struct SerialMIDISettings : public midi::DefaultSettings {
  static const long BaudRate = 31250;
  static const int8_t RxPin = 13;
  static const int8_t TxPin = 22;
};
MIDI_CREATE_CUSTOM_INSTANCE(HardwareSerial, Serial, MIDI1, SerialMIDISettings);
// MIDI_CREATE_INSTANCE(SoftwareSerial, midiSerial, MIDI);
void setup_MIDI() {
  Serial.println("setup_MIDI debug 00");
  Serial.begin(31250, SERIAL_8N1, 13, 22);
  // midiSerial.begin(31250); // MIDI baud rate
  // DIN_MIDI.begin(MIDI_CHANNEL_OMNI);

   MIDI1.begin(MIDI_CHANNEL_OMNI); // Listen to all channels  /////////////////////////  will cause guru medidation

  // MIDI.turnThruOff(); // Disable MIDI thru
  //
  // Send MIDI message
  Serial.println("setup_MIDI debug 01");
  MIDI1.sendNoteOn(60, 127, 1);  // Note On, C4, velocity 127, channel 1
  delay(500);
  // Send MIDI message
  MIDI1.sendNoteOn(60, 0, 1);  // Note Off, C4, velocity 127, channel 1
  Serial.println("setup_MIDI debug 02");
}

Hello,
I get a TTGO LORA32, and has output pin for UART there is only GPIO 1 & 3 (used for USB serial).
I need to add a SIM800 (GPRS).
I tried using GPIO 12 & 13... without any success. (Serial2.begin(115200, SERIAL_8N1, SERIAL2_TX, SERIAL2_RX);
Does someone know how to use UART with the board ?
thanks

Hello, it seems you reversed the TX and RX in your Serial2.begin command.
It should be SerialPort2.begin (BaudRate, SerialMode, RX_pin, TX_pin).
You'll find a tutorial on using the serial ports, including using alternative pins here : https://microcontrollerslab.com/esp32-uart-communication-pins-example/


Add a single collectible to a reward (BE)

Statement of Value
As a Creator
I want to add a collectible to a reward
So that a Contributor will be able to earn it by investing in my campaign
———
Acceptance Criteria

A Creator must be able to create a collectible within a reward with the following attributes:
1.1. sn
1.2. id
1.3. collection (A collectible must be minted from a collection which must be created automatically for each DAO in BE)
1.4. symbol
1.5. Name (A user will indicate a value of this parameter on UI)
1.6. Description (A user will indicate a value of this parameter on UI)
1.7. Metadata. Collectible file. (A user will upload this file on UI).
• File types supported: AAC, AVI, BMP, FLAC, GIF, GLB, HEIC, ICO, JPG, JSON, M4V, MOV, MP3, MP4, MPEG, OGG, PDF, PNG, SVG, TIFF, WAV, WEBM, WEBP.
• Max file size: 30 MB
1.8. Royalty percent float (A user will indicate a value of this parameter on UI)
1.9. Royalty receiver (This must be a user who creates a reward)
1.10. Quantity:
• Unlimited(A user won't indicate q-ty on UI) (unlimited number of Contributors will be able to earn a collectible)
• Limited (A user will indicate a number which is greater than 0 on UI) (limited number of Contributors will be able to earn a collectible)
1.11. Minimum funding amount (if the amount of contribution is less than a min. funding amount, then this contribution is not eligible for a reward)
1.12. Thumbnail. (A user will upload this file on UI).
• File types supported: JPG, PNG, SVG.
• Max file size: 30 MB
1.13. Custom attribute. 100 custom attributes max can be created for one collectible. (A user will indicate a name and a value of this parameter on UI).

Collection must be created for each DAO with the following attributes:
2.1. id
2.2. Name (The name of the DAO must be used here)
2.3. Description (The description of the DAO must be used here)
2.4. Collection max (How many NFTs will ever belong to this collection). 0 must be set by default.
2.5. Issuer (Issuer's address (can be different than minter)
2.6. Symbol (Ticker symbol by which to represent the token in wallets and UIs (e.g. "ZOMB"))
2.7. Metadata (The image of the DAO must be used here)
• File types supported: JPG, PNG.
• Max file size: 30 MB

Multiple collectibles can be minted from one collection.

Multiple collectibles can be added to one reward.

———
Additional Information
High-level process

Specification
Domain model, data dictionary can be found here.
User flows
User flows that outline the detailed process can be found here.

Moved: https://github.com/playzero/zero-network/issues/188


(tsoding/nothing#1173) Set metadata title to filename when saving

fix #1173

@rexim should we explicitly include the <string.h> ?

Ups, you commited fix for another issue on top. It's better to create new branch for each pull-request.

Uh, yeah it was 6am lol. I will fix thanks.


Catch 404 & 403's, patch in navbar

Catch all 404's and redirect them to /404
Catch all 403's and redirect them to /403
Small fix in the navbar: if an edition doesn't exist, don't display it in the dropdown but keep the current value. This avoids having a random edition in your navbar that you can't really get rid of.

It should be safe to catch all 404's and 403's because all requests that you send on a page are either regular GET's that always exist, or filtered GET's that never throw a 404. This should only happen when you try to go to a page in your browser bar.
fixes #260, fixes #423

Codecov Report

Merging #426 (8f76a25) into develop (b8a583a) will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             develop        #426   +/-   ##
=============================================
  Coverage   96.07235%   96.07235%
=============================================
  Files             81          81
  Lines           1935        1935
=============================================
  Hits            1859        1859
  Misses            76          76


Move logging to separate crate

Moves fedimint-server/logging to it's own crate, allowing us to use it in client and remove fedimint-server dep from the gateway.
Fixes #1722
Fixes #1723

Codecov Report
Base: 63.57% // Head: 63.38% // Decreases project coverage by -0.20% :warning:

Coverage data is based on head (2119cde) compared to base (093fdc5).
Patch coverage: 0.00% of modified lines in pull request are covered.

:exclamation: Current head 2119cde differs from pull request most recent head c76e1f7. Consider uploading reports for the commit c76e1f7 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1743      +/-   ##
==========================================
- Coverage   63.57%   63.38%   -0.20%
==========================================
  Files         134      134
  Lines       24629    24639      +10
==========================================
- Hits        15659    15618      -41
- Misses       8970     9021      +51

Impacted Files
Coverage Δ

client/cli/src/main.rs
0.26% <0.00%> (+<0.01%)
:arrow_up:

client/client-lib/src/lib.rs
77.85% <ø> (-0.11%)
:arrow_down:

client/client-lib/src/mint/backup.rs
88.09% <ø> (ø)

fedimint-core/src/api.rs
80.35% <ø> (+0.53%)
:arrow_up:

fedimint-core/src/db/mod.rs
88.41% <ø> (ø)

fedimint-core/src/lib.rs
90.53% <ø> (ø)

fedimint-core/src/task.rs
61.71% <ø> (ø)

fedimint-dbtool/src/main.rs
1.36% <ø> (ø)

fedimint-logging/src/lib.rs
54.83% <ø> (ø)

fedimint-server/src/config/mod.rs
62.27% <ø> (ø)

... and 33 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.