How To Change Date Fomat method

When I send data to the API, I find that the parameters of the moment.Moment type are converted to ISO time when calling the ToJS method, resulting in inconsistent with my current time zone. Can I modify the ToJS method to modify the date formatting rules?
 data["startDate"] = this.startDate ? this.startDate.toISOString() : null;

At the moment this is not doable without exchanging the whole template...
How would you modify it?

I think need provide an option to allow users to customize how to format the date. Because the date is a special type. I decided to temporarily rewrite the moment.js toISOString method to implement this functionality.

How would you change the output? How should the code look like?

@baiyunchen I've added date support to the typescript generator in NJsonSchema:
https://github.com/RSuter/NJsonSchema/pull/493
(Not included in an NSwag release yet)
So for date format properties it will generate yyyy-MM-dd format data.
Is that what you were after?

The feature is now released

Can we close this?

@RSuter  Sorry for my reply late, please close it.thanks


Provide option to select multiple files in File Browser

The File Browser currently only allows selecting a single file at a time. Providing an option to select multiple at once can be useful.

OpenFiles That one allows multiple files, see the demo for an example.

It would make more sense for that to be changed into a flag set on the OpenFile function to operate more similar to standard .Net OpenFileDialog's Multiselect variable.


Thanks for the contribution, If can provide more test cases, or explain the documentation is best

Thanks for the contribution, the test results are good
By example, I tested the cpu data，The load has increased to 80% in a short time.

If can provide more test cases, or explain the documentation is best

@xinghui-hou Thank you for your interest in chaosblade, our focus this month is on documents.

https://chaosblade-io.gitbook.io/chaosblade-help-zh-cn/blade-create-k8s


Error: Source and destination must not be the same.

I couldn't generate a new Component at the same folder.

But just to your information,
I tried doing it in a saga file, not in a component.

The error message here seems very specific, isn't it the case that this is a feature not a bug?

Now,  I think so.
Maybe the library no need this functionality because it's out of the scope.
The library is to work with components and note any other type.

I will close the issue, because it's out of the way.


A notification is made even for a repeated play

The first play made correctly generates a notification.
Subsequent plays also generate a notification, however.
If there is already a play in for this user then there should be no further notification as it's not a significant action that the rest of the channel should care about.

This only seems to happen when there is another play from someone else in as well, because there's already a check for if this play is new:
https://github.com/grifferz/pah-irc/blob/159e50ecb386aec08a9f4e8e67acdd14a3edf3a1/lib/PAH.pm#L2401
So no notification is generated from making a repeated play, however it is still inserted into the play tally with notified => 0. If another play comes in fast enough, this one will be collected up with it as needing notification.
I think if $is_new == 0 then it should be treated as already notified.


nixos: switch the default channel to "nixpkgs"

This is a proposal to change NixOS channel to be installed on the nixpkgs prefix instead of nixos.
Before:
$ nix-channel --list
nixos https://nixos.org/channels/nixos-unstable

After:
$ nix-channel --list
nixpkgs https://nixos.org/channels/nixos-unstable

The goal is to reduce the complexity in installation instructions so we can tell all our users to use the same nix-env -iA nixpgks.<package-attr> command. If you look at most projects, all the other package managers have a single-line installation instruction but we always require 2 minimum (+2 for comments on the difference).
Both NixOS and nixpkgs channels are cut from the same repository and
same branches. The difference is how fast each channel advances based on
their specific set of tests. Because of the different name I was often left wondering of the difference and if there were special packages available on the nixos channel that weren't in nixpkgs.
The new Nix CLI uses the "nixpkgs." prefix, eg: nix run nixpkgs.hello
while nix-env still needs the "nixos." prefix.
Users have to remember on which machine they are installing a package.
Motivation for this change
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Fits CONTRIBUTING.md.

One open question is how the upgrade path for existing NixOS would look like. The change should be backward-compatible except for manual instructions. It would be nice if old users could use both the old and new notations.

thanks @srhb!
thanks @samueldr for reading between the lines, your feedback is awesome. I agree that there are still unknowns to be uncovered and this is exactly the type of feedback I was looking for.

Can we somehow make installations with nix-env -iA nixos.hello throw an error like "error: nixos. has been changed to nixpkgs."? Because if not, we'd break a lot of installation instructions out there.

I think it's a good idea to make this more consistent.
nixos is also used on https://nixos.org/nixos/packages.html for example.

I think we should not change this at this time, because 1) it's an incompatible change; and 2) all of this will change anyway once we have flakes and a nix-channel replacement.

Closing then?

this will change anyway once we have flakes and a nix-channel replacement.

@edolstra can you say something about the status of that? Is there a chance it will be ready for the next release? When not we could still use this workaround in the next NixOS release until we have a clean solution. It might be a huge help for (new) Nix(OS) users.

What about aliasing those two in some way?

I think I found a backward-compatible way of tweaking the layout of ~/.nix-defexpr (which is the legacy folder nix-env uses instead of NIX_PATH). With that change in mind we would:

Keep the nixos root channel
But allow to use the nixpkgs. prefix in nix-env
And change all the doc to point to the nixpkgs. prefix

TBC

$ nix-channel --list

$ sudo nix-channel --list
nixos https://nixos.org/channels/nixos-unstable

$ tree ~/.nix-defexpr/
/home/zimbatm/.nix-defexpr/
├── channels_root -> /nix/var/nix/profiles/per-user/root/channels
└── nixpkgs-compat
    └── nixpkgs -> /nix/var/nix/profiles/per-user/root/channels/nixos

$ nix search hello
warning: using cached results; pass '-u' to update the cache
* nixpkgs.gnome3.iagno (iagno-3.28.0)
  Computer version of the game Reversi, more popularly called Othello

* nixpkgs.hello (hello)
  A program that produces a familiar, friendly greeting
[...]
$ nix-env -iA nixpkgs.hello
installing 'hello-2.10'

The only issue is nix-env -qaP which lists both prefixes:
$ nix-env -qaP | head -n 6
nixpkgs._1password                                                       1password-0.5.4
nixos._1password                                                         1password-0.5.4
nixpkgs._2048-in-terminal                                                2048-in-terminal-2017-11-29
nixos._2048-in-terminal                                                  2048-in-terminal-2017-11-29
nixpkgs._20kly                                                           20kly-1.4
nixos._20kly                                                             20kly-1.4

The only issue is nix-env -qaP which lists both prefixes

Does that mean it also evaluates nixpkgs twice, or is that memoised? If it has to evaluate twice that's quite a pain…

It's evaluated twice when using nix-env -qaP. It went from 7s to 12s on my system. Since it will be replaced I think it's alright. For example nix search is not affected by that change either.

This PR has changed from switching the channel name to tweaking ~/.nix-defexpr to allow the unification of prefixes during nix-env -iA installs. I updated the PR description to reflect the new approach. This makes the PR backward-compatible and allows us to update and simplify the documentation.

As long as the command uses NIX_PATH instead of the old ~/.nix-defexprs it won't be impacted. I think that if the command uses ~/.nix-defexprs but specifies the prefix it won't be impacted either.
Not impacted by this PR:

any of the new nix commands
nixos-rebuild
nix-build
explicit <nixpkgs> imports
Impacted:
nix-env -qaP

TODO: test the following commands:

[ ] nix-env -iA nixos.hello (how to test this?)
[ ] nix-shell -p hello (how to test this?)

Did I miss anything?

Modifying ~/.nix-defexpr from the login script is the kind of stateful, untracked configuration change that doesn't fit very well in NixOS.
Also given that many systems are already barely able to evaluate Nixpkgs, evaluating it twice isn't really an option.

I am currently blocked on resolving all the constraints:

Keep backward-compatible
Not rename the nixos channel
Not touch ~/.nix-defexpr
Avoid double nixpkgs evaluation on a subset of the old commands

Potential routes I can see:
a. Patch nix-env to alias nixpkgs to nixos if no nixpkgs prefix exists.
b. Help with the channel replacement (I don't know where that is?)

a) in short-term and having the channel replacement long-term, does not sound too bad to me.


User can read a User's Tweets

API URL:
GET /users/:userId/tweets
Success:
200 OK[Tweet {id: Number, username: String, message: String}]
Error:
404 Not Found

[x] Use pg
[x] use browser or curl to read JSON

closed by 1ea38f8c2efcbe47bf566f329265969c415338fd


Added support for NO_COLOR env variable

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (4791f81) 74.22% compared to head (1c56775) 74.22%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #12   +/-   ##
=======================================
  Coverage   74.22%   74.22%
=======================================
  Files         101      101
  Lines        1482     1482
  Branches      171      171
=======================================
  Hits         1100     1100
  Misses        318      318
  Partials       64       64

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


Issue with npm 'ttys' library in 'Debug' mode

VSCode Version: 1.23.1
OS Version: Mac OSX 10.13.4

Steps to Reproduce:

Use require("ttys") module in imports list
start from Debug console

Does this issue occur when all extensions are disabled?: Yes

Error: ENOENT, no such file or directory '/dev/tty'

Happens only through "debug" mode, normal CLI works fine.

The VS Code debug console is not a tty. So it is expected that the "tty" modules cannot find the "/dev/tty" device.
The fix is to set the "console" attribute of your launch config to "integratedTerminal".

Thanks @weinand


ETA of 1.20 ver? Or just change the version in fabric.mod.json?

You know what im here for, so hands up, and answer CAREFULLY :DD

Excited for the update!


Modified 'form_dropdown()' to allow an array of attributes for the first parameter.

Modified 'form_dropdown()' to allow an array of attributes for the first parameter, much like other form helper functions.

Must merge it =D


Recent issues in Azure Bot service

Hi team, I am Yutong from Azure CXP team. We work with our customers and monitor the various social media channels/forums for any issues in our services. We have recently come across some issues in the bot service which seem to effect multiple customers. Could you please take a look at the following issues or forward them to appropriate teams so they can be addressed.
Issue 1: Bot channel registration endpoints does not get updated after any updates from portal.
•	The customer has provided steps to reproduce the issue and we are able to confirm that the same behavior is seen. The updates to endpoints seems to be saved after a green tick is seen in the field where the endpoint needs to be updated but the portal throws up a pop up to save unsaved edits while exiting this blade from the Azure portal.
https://social.msdn.microsoft.com/Forums/en-US/b69220fe-af32-4224-ae11-65c753934fe6/bot-channels-registration-messaging-endpoint-does-not-update-after-change?forum=AzureCognitiveService
https://social.msdn.microsoft.com/Forums/en-US/d8c23599-18e8-47eb-b72e-9bb4487b79dd/bot-channels-registration-messaging-endpoint-does-not-update-after-change?forum=AzureCognitiveService
Issue 2: New password generation from Manage link of Azure bot channel registration does not work.
•	Customers are unable to use the manage option to update the password or certificate and keys from the bot channel registration page. They are redirected to a page which says page not found. We are unable to replicate the same under MS tenant version of the portal but multiple customers have reported this issue.
Manage option redirects to a page not found.
<< OLE Object: Picture (Device Independent Bitmap) >>
Similar issues.
o	 << Message: Cannot generate new password for Bot Channel Registration >>
o	https://social.msdn.microsoft.com/Forums/azure/en-US/d73dc060-c492-4952-af65-36f01a167605/cannot-generate-new-password-for-bot-channel-registration?forum=AzureCognitiveService
•	Workaround for issue 2 has been provided to customers to help them set new passwords directly from the app service.
<< Message: RE: Cannot generate new password for Bot Channel Registration >>
https://social.msdn.microsoft.com/Forums/en-US/f270ca07-54f5-4cfd-a673-925f113bf4ca/cannot-generate-new-password-for-bot-channel-registration?forum=AzureCognitiveService
Issue 3: Integration questions of bot with facebook.
•	Do we have an option to add multiple facebook page id’s to the bot channel configuration programmatically? We could not find an API reference to get the same updated from the current documentation. Could you please confirm if this is possible?
•	What is the limit to the one of pages that can be connected to the facebook connector? The channel settings page in the portal allows us to add pages but is there a limit to the number of pages that can be added for one bot?
https://social.msdn.microsoft.com/Forums/en-US/cb25fa4a-326c-42b4-a2c0-2e7db1eedc8c/bot-with-facebook-integration-question?forum=AzureCognitiveService

#2 should now be resolved.  We'll investigate 1 & 3 and provide an update.  @dmvtech

number 1 has been addressed by the comment that is now added in this page:

Regarding number 3: there is no way to do this programmatically nor through CLI tools. It can be done with the UI only.
As these questions have been answered, I am closing this. If you need further assistance, please create new tickets for a specific issue.


Colouring an icon inside a chip doesn't work

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behaviour 😯
I set the colour of a Chip to secondary, then gave it an icon & tried to set the icon's colour using the sx prop, because it is not a theme colour. But this colour is overridden by a class with higher specificity setting it back to inherit, and I can't seem to get to something that has a higher specificity easily.

This is the devtools showing the classes attached:

My color: orange is being overridden 🙁

Expected Behaviour 🤔
Should look like:

I'm not entirely sure if there is a better way to do this, but from what I can see there isn't. I've not been using MUI for very long, but really like it so far 👍
Steps to Reproduce 🕹

Codesandbox: https://codesandbox.io/s/admiring-ptolemy-2lies
<Chip
    variant={"outlined"}
    label={"Tool 1"}
    color={"primary"}
    icon={<CircleIcon sx={{color: orange}}/>}
/>

Context 🔦

I'm creating a graph legend, using recharts. Working on a my own new UI powered by Material UI for OctoPrint

Your Environment 🌎

`npx @material-ui/envinfo`
System:
    OS: Windows 10 10.0.19043
  Binaries:
    Node: 14.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 7.16.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 91.0.4472.77  (Using New MS Edge 91)
    Edge: Spartan (44.19041.964.0), Chromium (91.0.864.41)
  npmPackages:
    @emotion/react: ^11.4.0 => 11.4.0
    @emotion/styled: ^11.3.0 => 11.3.0
    @material-ui/core: ^5.0.0-alpha.35 => 5.0.0-alpha.35
    @material-ui/icons: ^5.0.0-alpha.35 => 5.0.0-alpha.35
    @material-ui/private-theming:  5.0.0-alpha.35
    @material-ui/styled-engine:  5.0.0-alpha.34
    @material-ui/system:  5.0.0-alpha.35
    @material-ui/types:  6.0.1
    @material-ui/unstyled:  5.0.0-alpha.35
    @material-ui/utils:  5.0.0-alpha.35
    @types/react:  17.0.9
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    typescript:  4.3.2

@cp2004 you can use the sx prop on the Chip component and apply the styles for the icon there. That way they would have the same specificity. As the sx generated styles would come after the components' styles they would win. Here is a working example: https://codesandbox.io/s/vigilant-snowflake-r9t74?file=/src/Demo.tsx

Oh yeah, that works. Thanks 😄. Over the last few days I've learnt a lot about the new sx prop - liking it so far, even if it is completely new concept to me (well, I guess it is new to a lot of people). Thanks again, @mnajdova!

Another way to do it is to add double '&&' to sx. That will create enough specificity higher than the parent. Both ways work!
<Chip
  label="Content"
  color="primary"
  icon={<CircleIcon sx={{ "&&": { color: "orange" } }} />}
/>

https://codesandbox.io/s/prod-sunset-n7isd?file=/src/Demo.tsx:248-367

Isn't this a bug?

Isn't this a bug? Why is this closed?

I don't think this is a bug. However, this can be improved with CSS variables in the near future.


Rework day 1

Day 1: basics/collections has been reworked
Status day 1:

[X] nb1: basics
[X] nb1: types
[X] nb2: collections

Status finishing:

[x] add images and colors.jl intermezzo to nb0
[ ] adding some validators to basics
[ ] question testing
[ ] proofreading

related to #35 #3
@DaanVanHauwermeiren do you have some time to add some validators to the final questions you made for julia925?
@MichielStock  if you want/have time you can also check for content

Maybe, we can comment all code students have to run? This makes it a bit more interactive.
I made some changes
I think the exercises can be a bit more straightforward. Still have to think about some simple examples (in the order of find two numbers in a list that sum to 2021).

Maybe, we can comment all code students have to run? This makes it a bit more interactive.
I made some changes
I think the exercises can be a bit more straightforward. Still have to think about some simple examples (in the order of find two numbers in a list that sum to 2021).

We can comment the code, not sure if that is going to so much more interactivity since in Jupyter it is only hitting shift+enter...
Agree with the changes
Definitely that was also what I was thinking, we can move some of the more difficult ones to an additional section "optional exercises" for the speedy participants. I'm going to brainstorm on that too

We can comment the code, not sure if that is going to so much more interactivity since in Jupyter it is only hitting shift+enter...
Agree with the changes
Definitely that was also what I was thinking, we can move some of the more difficult ones to an additional section "optional exercises" for the speedy participants. I'm going to brainstorm on that too

I've added some outlines for simple exercises in 63f898f, 9d1d252 and 0a90436. This should be more suitable for beginners.

I've added some outlines for simple exercises in 63f898f, 9d1d252 and 0a90436. This should be more suitable for beginners.


Add timestamp check when downloading the repository database

Please add a timestamp check when updating the mirror, if it has not changed to assume that the repository has not changed either.

It's a bit tough, as it also requires checking things like filters which might have changed between aptly mirror update calls.


Stop batch processing during rebalancing

Hello! Is it possible to stop batch processing during rebalancing? Otherwise, after rebalancing the partition can be assigned to another consumer and it will start processing the same batch, because previous consumer will not be able to commit the offset.

This is a distributed system, so you first need to know that there is a rebalance in process. The way that we find out about that is because we try to do something on behalf of the consumer group, such as committing an offset or heartbeating, and get an error back telling us that we need to re-join the group.
In your scenario, if the partition gets re-assigned to another member of the group, the member that previously had it would get an error when it tries to commit or heartbeat, so it will discard the current batch, rejoin the group and be assigned new partitions. There's no way to stop processing when the group needs to rebalance before even finding out that it needs to.

get an error when it tries to commit or heartbeat

This is great, because the heartbeat is sent after each message. Thank you!

btw, I was looking for a kind of onRebalance event handler in node-kafka:
{
  // Callback to allow consumers with autoCommit false a chance to commit before a rebalance finishes
  // isAlreadyMember will be false on the first connection, and true on rebalances triggered after that
  onRebalance: (isAlreadyMember, callback) => { callback(); } // or null
};

Callback to allow consumers with autoCommit false a chance to commit before a rebalance finishes

Hmm, this is a good point, actually. Now that I think about it, I think my previous comment is half-right:

The way that we find out about that is because we try to do something on behalf of the consumer group, such as committing an offset or heartbeating [...]

I'm pretty sure that it's on the heartbeat that we find out that we need to re-join, not on commit. Because the consumer can still commit as long as it hasn't been kicked out of the group and it hasn't yet tried to re-join the group. Once it issues the JoinGroup request it can definitely not commit anymore until all the members have joined and synced.
By default, we heartbeat in between each message when using eachMessage and in between each batch with eachBatch. With autoCommit: true, this is handled already since we commit any resolved offset if there's an error, but with autoCommit: false it gets trickier. We do pass heartbeat to eachBatch, so the user could catch the error and figure out if it's because the group is rebalancing, and then commit the resolved offsets before re-throwing the error, but that seems error prone and complicated for the user.

so the user could catch the error ... and then commit the resolved offsets
I have been doing it like this.  But I agree an explicit callback would be cleaner.  And if we have that then it would make sense to have a callback for when partitions are assigned as well (although the instrumentation event suffices for me here.)
Java client callbacks https://kafka.apache.org/25/javadoc/org/apache/kafka/clients/consumer/ConsumerRebalanceListener.html


Causes error when a prop doesn't exists

Consider the example below:
import { resolveValue } from "path-value";

const obj = {
  first: {
    secondElse: {}
  }
};

const val = resolveValue(obj, "first.second.value");
console.log(val);

https://codesandbox.io/s/path-value-6fdpg?file=/src/index.js
Expected behavior:
Return undefined instead of error or we could create a third argument to be returned as default value.

The library replicates that how JavaScript itself behaves. When you try to access a property from a previous property that's undefined, you will get the same error in JavaScript.
I understand that you are looking for something synthetic instead, to pass in some defaults for resolution. The first issue with that - what defaults, how many of them, and how they are supposed to affect the ongoing resolution. A property path can have multiple places where it might need to resort to such defaults, not just one. The protocol for this would be not very clear, and quite custom-designed. I tried to keep this library as close to the standard JavaScript as possible.
This library however, is very extensible, and you can easily implement any such defaults logic as you wish, by simply using a lower-level resolvePath function.


Auto hyper-parameter tuning

MLBlocks version:
Python version:
Operating System:

Description
I'm running a Random Forest Classifier algorithm and I'm trying to tune the algorithm hyper-parameter. However, after inspecting the code it seems that the algorithm uses the default values only and their is no automatic tuning is happening. Can you please tell me what should I do exactly in order to invoke and tune the hyper-parameter.
What I Did
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from mlblocks import MLPipeline
from mlblocks import MLBlock
from sklearn.metrics import accuracy_score as score

primitive = [
     'sklearn.ensemble.RandomForestClassifier',
  ]

pipeline_for_one = MLPipeline(primitive)
iris = load_iris()
X_train, X_test, y_train, y_test = train_test_split(iris.data, iris.target,  test_size=0.2,random_state=7)

pipeline_for_one.fit(X_train, y_train)
y_pred = pipeline_for_one.predict(X_test)

x = pipeline_for_one.blocks
xx = x.popitem()
b = xx[1]
b.instance
'''
the output was: (all default values)
 RandomForestClassifier(bootstrap=True, class_weight=None, criterion='entropy',
            max_depth=10, max_features=None, max_leaf_nodes=None,
            min_impurity_decrease=0.0, min_impurity_split=None,
            min_samples_leaf=0.1, min_samples_split=0.1,
            min_weight_fraction_leaf=0.0, n_estimators=30, n_jobs=-1,
            oob_score=False, random_state=None, verbose=0,
            warm_start=False)'''

Thanks for reporting this @NajatAbd
As you noticed, when you fit the pipeline there is no tuning involved. It just uses the hyperparameters that have been set.
In order to tune the pipeline, you will need to add the usage of a tuner library like BTB, and use the hyperparameter specification returned by the get_tunable_hyperparameters method to configure the corresponding tuner.
You can see an example of this in this gist: https://gist.github.com/csala/9541bd31f21a8de90c05ee4604901b09


Set up CI build for windows

Apologies for the very delayed response. The development team managing this codebase is also responsible for Apache HAWQ (incubating) and trying to get the first release out the door. As a result, this repo has been unintentionally neglected and recently turned read-only.
This code was birthed from HAWQ and will be merged back into into that project (now that it is open source as well); mailing lists, pull requests, issues and releases related to libhdfs3 will be there. The plan is to provide tarball releases of this code separate from the larger HAWQ project until it can be relocated into a dedicated repo again (down the road) - see HAWQ-1059.
Again, thank you for the contribution and patience while we sort out these logistics.
@thanhdowisc if this issue/feature is still useful, please respond.


HandleUserPreferenceChanged should handle ArgumentNullException

Describe the bug
DetectTheme is throwing a ANE when there is no app or window. This sounds like a good idea, but there's no way to catch these exceptions as HandleUserPreferenceChanged is private. So it causes the application to crash. This doesn't happen frequently but during closing it shouldn't cause a crash as other stuff might still require a dispose or save.
Environment:

MahApps.Metro version: 2.0.0-alpha0309
OS: W10 Home

Additional context
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: app
at MahApps.Metro.ThemeManager.DetectTheme(System.Windows.Application app) at offset 18 in C:\projects\mahapps-metro\src\MahApps.Metro\ThemeManager\ThemeManager.cs:line 821:col 17
at MahApps.Metro.ThemeManager.ChangeThemeBaseColor(System.Windows.Application app, System.String baseColor) at offset 0 in C:\projects\mahapps-metro\src\MahApps.Metro\ThemeManager\ThemeManager.cs:line 622:col 13
at MahApps.Metro.ThemeManager.HandleUserPreferenceChanged(System.Object sender, Microsoft.Win32.UserPreferenceChangedEventArgs e) at offset 14 in C:\projects\mahapps-metro\src\MahApps.Metro\ThemeManager\ThemeManager.cs:line 978:col 9
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(System.Object target, System.Object[] arguments, System.Signature sig, System.Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object obj, System.Object[] parameters, System.Object[] arguments) at offset 22
at System.Delegate.DynamicInvokeImpl(System.Object[] args) at offset 36
at Microsoft.Win32.SystemEvents.SystemEventInvokeInfo.InvokeCallback(System.Object arg) at offset 18
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, System.Object args, System.Int32 numArgs) at offset 142
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object source, System.Delegate callback, System.Object args, System.Int32 numArgs, System.Delegate catchHandler) at offset 2

@Nuklon this has now been fixed, and it will be released in the next version of MahApps.Metro v2.0

Fantastic work, thank you!


Schema DDL: decide if AST can be parsed with invalid values

Let's leave it out of scope of R7. We're not using Schema AST extensively and right now invalid values make sense. Though if I remember right there's some inconsistencies between these: maxItems maxLength etc

Migrated to https://github.com/snowplow-incubator/schema-ddl/issues/19


Not able to build on arch arm (eg Raspberry Pi)

I'm having difficulty getting it built on a Raspberry Pi / Arm.

pi@raspberrypi:~/companion-remote $ yarn install
yarn install v1.22.10
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>[5/5] Building fresh packages...
[1/8] ⠁ @julusian/jpeg-turbo
[7/8] ⠁ electron
[3/8] ⠁ sharp
[4/8] ⠁ usb-detection
error /home/pi/companion-remote/node_modules/@julusian/jpeg-turbo: Command failed.
Exit code: 1
Command: prebuild-install -r napi || cmake-js compile --target jpegturbo
Arguments:
Directory: /home/pi/companion-remote/node_modules/@julusian/jpeg-turbo
Output:
prebuild-install WARN install No prebuilt binaries found (target=3 runtime=napi arch=arm libc= platform=linux)
[
'/usr/local/bin/node',
<EMAIL_ADDRESS>'compile',
'--target',
'jpegturbo'
]
info TOOL Using Unix Makefiles generator.

Try doing an apt-get update && apt-get install -y cmake yasm then try the yarn install again

Awesome that did work.  I didn't realize it was cmake that was missing.
I also had to install libudev and libusb packages.


Can't stream video

Hi,
I can't stream video using the h264_omx codec, I searched for hours, but impossible to find the solution .... Could someone help please?
Here's my conf:
{
"name": "Camera ffmpeg",
"cameras": [
{
"name": "Salon",
"videoConfig": {
"source": "-re -i rtsp://admin:password@<IP_ADDRESS>:554/live1.sdp",
"stillImageSource": "-i http://admin:password@<IP_ADDRESS>/dms?nowprofileid=2",
"maxStreams": 3,
"maxWidth": 1280,
"maxHeight": 720,
"maxFPS": 25,
"vcodec": "h264_omx",
"audio": true,
"debug": true,
"additionalCommandline": "-loglevel verbose"
}
}
],
"platform": "Camera-ffmpeg"
}
And here's the log:
Dec 02 12:11:25 raspberrypi homebridge[530]: [12/2/2019, 12:11:25] [Camera ffmpeg] Start streaming video from Salon with 1280x720@299kBit
Dec 02 12:11:25 raspberrypi homebridge[530]: ffmpeg -re -i rtsp://admin:password@<IP_ADDRESS>:554/live1.sdp -map 0:0 -vcodec h264_omx -pix_fmt yuv420p -r 25 -f rawvideo -loglevel verbose -b:v 299k -bufsize 299k -maxrate 299k -payload_type 99 -ssrc 13073588 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params JCE2ju5mRvR9awAPzqBkLGc7C4EE5tH7VP+hzmf5 srtp://<IP_ADDRESS>:61747?rtcpport=61747&localrtcpport=61747&pkt_size=1316 -map 0:1 -acodec libfdk_aac -profile:a aac_eld -flags +global_header -f null -ar 16k -b:a 24k -bufsize 24k -ac 1 -payload_type 110 -ssrc 11370109 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params IKXhzxFRfqXJ6SjvW6wX2kVGrt1ZzZa2KfNeFjYs srtp://<IP_ADDRESS>:57639?rtcpport=57639&localrtcpport=57639&pkt_size=1316 -loglevel debug
Dec 02 12:11:25 raspberrypi homebridge[530]: ffmpeg version N-95859-g93414ce831 Copyright (c) 2000-2019 the FFmpeg developers
Dec 02 12:11:25 raspberrypi homebridge[530]:   built with gcc 8 (Raspbian 8.3.0-6+rpi1)
Dec 02 12:11:25 raspberrypi homebridge[530]:   configuration: --prefix=/usr/local --arch=armel --target-os=linux --enable-omx-rpi --enable-nonfree --enable-gpl --enable-libfdk-aac --enable-mmal --enable-libx264 --enable-decoder=h264 --enable-network --enable-protocol=tcp --enable-demuxer=rtsp
Dec 02 12:11:25 raspberrypi homebridge[530]:   libavutil      56. 36.100 / 56. 36.100
Dec 02 12:11:25 raspberrypi homebridge[530]:   libavcodec     58. 62.100 / 58. 62.100
Dec 02 12:11:25 raspberrypi homebridge[530]:   libavformat    58. 35.100 / 58. 35.100
Dec 02 12:11:25 raspberrypi homebridge[530]:   libavdevice    58.  9.101 / 58.  9.101
Dec 02 12:11:25 raspberrypi homebridge[530]:   libavfilter     7. 67.100 /  7. 67.100
Dec 02 12:11:25 raspberrypi homebridge[530]:   libswscale      5.  6.100 /  5.  6.100
Dec 02 12:11:25 raspberrypi homebridge[530]:   libswresample   3.  6.100 /  3.  6.100
Dec 02 12:11:25 raspberrypi homebridge[530]:   libpostproc    55.  6.100 / 55.  6.100
Dec 02 12:11:25 raspberrypi homebridge[530]: Successfully parsed a group of options.
Dec 02 12:11:25 raspberrypi homebridge[530]: Parsing a group of options: input url rtsp://admin:password@<IP_ADDRESS>:554/live1.sdp.
Dec 02 12:11:25 raspberrypi homebridge[530]: Applying option re (read input at native frame rate) with argument 1.
Dec 02 12:11:25 raspberrypi homebridge[530]: Successfully parsed a group of options.
Dec 02 12:11:25 raspberrypi homebridge[530]: Opening an input file: rtsp://admin:password@<IP_ADDRESS>:554/live1.sdp.
Dec 02 12:11:25 raspberrypi homebridge[530]: [tcp @ 0x3092970] No default whitelist set
Dec 02 12:11:25 raspberrypi homebridge[530]: [tcp @ 0x3092970] Original list of addresses:
Dec 02 12:11:25 raspberrypi homebridge[530]: [tcp @ 0x3092970] Address <IP_ADDRESS> port 554
Dec 02 12:11:25 raspberrypi homebridge[530]: [tcp @ 0x3092970] Interleaved list of addresses:
Dec 02 12:11:25 raspberrypi homebridge[530]: [tcp @ 0x3092970] Address <IP_ADDRESS> port 554
Dec 02 12:11:25 raspberrypi homebridge[530]: [tcp @ 0x3092970] Starting connection attempt to <IP_ADDRESS> port 554
Dec 02 12:11:25 raspberrypi homebridge[530]: [tcp @ 0x3092970] Successfully connected to <IP_ADDRESS> port 554
Dec 02 12:11:25 raspberrypi homebridge[530]: [rtsp @ 0x3090970] SDP:
Dec 02 12:11:25 raspberrypi homebridge[530]: v=0
Dec 02 12:11:25 raspberrypi homebridge[530]: o=-<PHONE_NUMBER>532011 1 IN IP4 <IP_ADDRESS>
Dec 02 12:11:25 raspberrypi homebridge[530]: s=RTSP/RTP stream 1 from DCS-5222LB
Dec 02 12:11:25 raspberrypi homebridge[530]: i=live1.sdp with v2.0
Dec 02 12:11:25 raspberrypi homebridge[530]: t=0 0
Dec 02 12:11:25 raspberrypi homebridge[530]: a=type:broadcast
Dec 02 12:11:25 raspberrypi homebridge[530]: a=control:*
Dec 02 12:11:25 raspberrypi homebridge[530]: a=range:npt=0-
Dec 02 12:11:25 raspberrypi homebridge[530]: a=x-qt-text-nam:RTSP/RTP stream 1 from DCS-5222LB
Dec 02 12:11:25 raspberrypi homebridge[530]: a=x-qt-text-inf:live1.sdp
Dec 02 12:11:25 raspberrypi homebridge[530]: m=video 0 RTP/AVP 96
Dec 02 12:11:25 raspberrypi homebridge[530]: c=IN IP4 <IP_ADDRESS>
Dec 02 12:11:25 raspberrypi homebridge[530]: b=AS:1500
Dec 02 12:11:25 raspberrypi homebridge[530]: a=rtpmap:96 H264/90000
Dec 02 12:11:25 raspberrypi homebridge[530]: a=fmtp:96 packetization-mode=1;profile-level-id=42001F;sprop-parameter-sets=Z0IAH5WoFAFuQA==,aM48gA==
Dec 02 12:11:25 raspberrypi homebridge[530]: a=control:track1
Dec 02 12:11:25 raspberrypi homebridge[530]: m=audio 0 RTP/AVP 0
Dec 02 12:11:25 raspberrypi homebridge[530]: c=IN IP4 <IP_ADDRESS>
Dec 02 12:11:25 raspberrypi homebridge[530]: b=AS:64
Dec 02 12:11:25 raspberrypi homebridge[530]: a=control:track2
Dec 02 12:11:25 raspberrypi homebridge[530]: Failed to parse interval end specification ''
Dec 02 12:11:25 raspberrypi homebridge[530]: [rtsp @ 0x3090970] video codec set to: h264
Dec 02 12:11:25 raspberrypi homebridge[530]: [rtsp @ 0x3090970] RTP Packetization Mode: 1
Dec 02 12:11:25 raspberrypi homebridge[530]: [rtsp @ 0x3090970] RTP Profile IDC: 42 Profile IOP: 0 Level: 1f
Dec 02 12:11:25 raspberrypi homebridge[530]: [rtsp @ 0x3090970] Extradata set to 0x3094208 (size: 22)
Dec 02 12:11:25 raspberrypi homebridge[530]: [rtp @ 0x3092e50] No default whitelist set
Dec 02 12:11:25 raspberrypi homebridge[530]: [udp @ 0x3095870] No default whitelist set
Dec 02 12:11:25 raspberrypi homebridge[530]: [udp @ 0x3095870] end receive buffer size reported is 131072
Dec 02 12:11:25 raspberrypi homebridge[530]: [udp @ 0x30a5bc0] No default whitelist set
Dec 02 12:11:25 raspberrypi homebridge[530]: [udp @ 0x30a5bc0] end receive buffer size reported is 131072
Dec 02 12:11:25 raspberrypi homebridge[530]: [rtsp @ 0x3090970] setting jitter buffer size to 500
Dec 02 12:11:25 raspberrypi homebridge[530]: [rtp @ 0x30b63a0] No default whitelist set
Dec 02 12:11:25 raspberrypi homebridge[530]: [udp @ 0x30b6840] No default whitelist set
Dec 02 12:11:25 raspberrypi homebridge[530]: [udp @ 0x30b6840] end receive buffer size reported is 131072
Dec 02 12:11:25 raspberrypi homebridge[530]: [udp @ 0x30c6b80] No default whitelist set
Dec 02 12:11:25 raspberrypi homebridge[530]: [udp @ 0x30c6b80] end receive buffer size reported is 131072
Dec 02 12:11:25 raspberrypi homebridge[530]: [rtsp @ 0x3090970] setting jitter buffer size to 500
Dec 02 12:11:25 raspberrypi homebridge[530]: [rtsp @ 0x3090970] hello state=0
Dec 02 12:11:25 raspberrypi homebridge[530]: Failed to parse interval end specification ''
Dec 02 12:11:25 raspberrypi homebridge[530]: [h264 @ 0x3093d80] nal_unit_type: 7(SPS), nal_ref_idc: 3
Dec 02 12:11:25 raspberrypi homebridge[530]: [h264 @ 0x3093d80] nal_unit_type: 8(PPS), nal_ref_idc: 3
Dec 02 12:11:26 raspberrypi homebridge[530]: [h264 @ 0x3093d80] nal_unit_type: 7(SPS), nal_ref_idc: 3
Dec 02 12:11:26 raspberrypi homebridge[530]: [h264 @ 0x3093d80] nal_unit_type: 8(PPS), nal_ref_idc: 3
Dec 02 12:11:26 raspberrypi homebridge[530]: [h264 @ 0x3093d80] nal_unit_type: 7(SPS), nal_ref_idc: 3
Dec 02 12:11:26 raspberrypi homebridge[530]: [h264 @ 0x3093d80] nal_unit_type: 8(PPS), nal_ref_idc: 3
Dec 02 12:11:26 raspberrypi homebridge[530]: [h264 @ 0x3093d80] nal_unit_type: 5(IDR), nal_ref_idc: 3
Dec 02 12:11:26 raspberrypi homebridge[530]: [h264 @ 0x3093d80] Format yuv420p chosen by get_format().

Dec 02 12:11:27 raspberrypi homebridge[530]: Parsing a group of options: output url srtp://<IP_ADDRESS>:61747?rtcpport=61747&localrtcpport=61747&pkt_size=1316.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option map (set input stream mapping) with argument 0:0.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option vcodec (force video codec ('copy' to copy stream)) with argument h264_omx.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option pix_fmt (set pixel format) with argument yuv420p.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 25.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option f (force format) with argument rawvideo.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option b:v (video bitrate (please use -b:v)) with argument 299k.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option f (force format) with argument rtp.
Dec 02 12:11:27 raspberrypi homebridge[530]: Successfully parsed a group of options.
Dec 02 12:11:27 raspberrypi homebridge[530]: Opening an output file: srtp://<IP_ADDRESS>:61747?rtcpport=61747&localrtcpport=61747&pkt_size=1316.
Dec 02 12:11:27 raspberrypi homebridge[530]: [srtp @ 0x30f1b10] No default whitelist set
Dec 02 12:11:27 raspberrypi homebridge[530]: [rtp @ 0x30ef8f0] No default whitelist set
Dec 02 12:11:27 raspberrypi homebridge[530]: [udp @ 0x30efcb0] No default whitelist set
Dec 02 12:11:27 raspberrypi homebridge[530]: [udp @ 0x30d7640] No default whitelist set
Dec 02 12:11:27 raspberrypi homebridge[530]: Successfully opened the file.
Dec 02 12:11:27 raspberrypi homebridge[530]: Parsing a group of options: output url srtp://<IP_ADDRESS>:57639?rtcpport=57639&localrtcpport=57639&pkt_size=1316.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option map (set input stream mapping) with argument 0:1.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option acodec (force audio codec ('copy' to copy stream)) with argument libfdk_aac.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option profile:a (set profile) with argument aac_eld.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option f (force format) with argument null.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option ar (set audio sampling rate (in Hz)) with argument 16k.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option b:a (video bitrate (please use -b:v)) with argument 24k.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option ac (set number of audio channels) with argument 1.
Dec 02 12:11:27 raspberrypi homebridge[530]: Applying option f (force format) with argument rtp.
Dec 02 12:11:27 raspberrypi homebridge[530]: Successfully parsed a group of options.
Dec 02 12:11:27 raspberrypi homebridge[530]: Opening an output file: srtp://<IP_ADDRESS>:57639?rtcpport=57639&localrtcpport=57639&pkt_size=1316.
Dec 02 12:11:27 raspberrypi homebridge[530]: [srtp @ 0x31db390] No default whitelist set
Dec 02 12:11:27 raspberrypi homebridge[530]: [rtp @ 0x30efeb0] No default whitelist set
Dec 02 12:11:27 raspberrypi homebridge[530]: [udp @ 0x30f0260] No default whitelist set
Dec 02 12:11:27 raspberrypi homebridge[530]: [udp @ 0x30f01a0] No default whitelist set
Dec 02 12:11:27 raspberrypi homebridge[530]: Successfully opened the file.
Dec 02 12:11:27 raspberrypi homebridge[530]: detected 4 logical cores
Dec 02 12:11:27 raspberrypi homebridge[530]: [h264 @ 0x310a370] nal_unit_type: 7(SPS), nal_ref_idc: 3
Dec 02 12:11:27 raspberrypi homebridge[530]: [h264 @ 0x310a370] nal_unit_type: 8(PPS), nal_ref_idc: 3
Dec 02 12:11:27 raspberrypi homebridge[530]: Stream mapping:
Dec 02 12:11:27 raspberrypi homebridge[530]:   Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_omx))
Dec 02 12:11:27 raspberrypi homebridge[530]:   Stream #0:1 -> #1:0 (pcm_mulaw (native) -> aac (libfdk_aac))
Dec 02 12:11:27 raspberrypi homebridge[530]: Press [q] to stop, [?] for help
Dec 02 12:11:27 raspberrypi homebridge[530]: cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph_1_in_0_1 @ 0x324d890] Setting 'time_base' to value '1/8000'
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph_1_in_0_1 @ 0x324d890] Setting 'sample_rate' to value '8000'
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph_1_in_0_1 @ 0x324d890] Setting 'sample_fmt' to value 's16'
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph_1_in_0_1 @ 0x324d890] Setting 'channel_layout' to value '0x4'
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph_1_in_0_1 @ 0x324d890] tb:1/8000 samplefmt:s16 samplerate:8000 chlayout:0x4
Dec 02 12:11:27 raspberrypi homebridge[530]: [format_out_1_0 @ 0x324dc70] Setting 'sample_fmts' to value 's16'
Dec 02 12:11:27 raspberrypi homebridge[530]: [format_out_1_0 @ 0x324dc70] Setting 'sample_rates' to value '16000'
Dec 02 12:11:27 raspberrypi homebridge[530]: [format_out_1_0 @ 0x324dc70] Setting 'channel_layouts' to value '0x4'
Dec 02 12:11:27 raspberrypi homebridge[530]: [format_out_1_0 @ 0x324dc70] auto-inserting filter 'auto_resampler_0' between the filter 'Parsed_anull_0' and the filter 'format_out_1_0'
Dec 02 12:11:27 raspberrypi homebridge[530]: [AVFilterGraph @ 0x30f1850] query_formats: 4 queried, 6 merged, 3 already done, 0 delayed
Dec 02 12:11:27 raspberrypi homebridge[530]: [auto_resampler_0 @ 0x324e490] [SWR @ 0x324e620] Using s16p internally between filters
Dec 02 12:11:27 raspberrypi homebridge[530]: [auto_resampler_0 @ 0x324e490] ch:1 chl:mono fmt:s16 r:8000Hz -> ch:1 chl:mono fmt:s16 r:16000Hz
Dec 02 12:11:27 raspberrypi homebridge[530]: Output #1, rtp, to 'srtp://<IP_ADDRESS>:57639?rtcpport=57639&localrtcpport=57639&pkt_size=1316':
Dec 02 12:11:27 raspberrypi homebridge[530]:   Metadata:
Dec 02 12:11:27 raspberrypi homebridge[530]:     title           : RTSP/RTP stream 1 from DCS-5222LB
Dec 02 12:11:27 raspberrypi homebridge[530]:     comment         : live1.sdp with v2.0
Dec 02 12:11:27 raspberrypi homebridge[530]:     encoder         :
Dec 02 12:11:27 raspberrypi homebridge[530]: Lavf58.35.100
Dec 02 12:11:27 raspberrypi homebridge[530]:     Stream #1:0, 0, 1/16000: Audio: aac (libfdk_aac) (ELD), 16000 Hz, mono, s16, delay 288, 24 kb/s
Dec 02 12:11:27 raspberrypi homebridge[530]:     Metadata:
Dec 02 12:11:27 raspberrypi homebridge[530]:       encoder         : Lavc58.62.100 libfdk_aac
Dec 02 12:11:27 raspberrypi homebridge[530]: cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Dec 02 12:11:27 raspberrypi homebridge[530]:     Last message repeated 8596 times
Dec 02 12:11:27 raspberrypi homebridge[530]: [libfdk_aac @ 0x31daaf0] Queue input is backward in time
Dec 02 12:11:27 raspberrypi homebridge[530]: [rtp @ 0x3129b30] Non-monotonous DTS in output stream 1:0; previous: 1760, current: 352; changing to 1760. This may result in incorrect timestamps in the output file.
Dec 02 12:11:27 raspberrypi homebridge[530]: [rtp @ 0x3129b30] Non-monotonous DTS in output stream 1:0; previous: 1760, current: 864; changing to 1760. This may result in incorrect timestamps in the output file.
Dec 02 12:11:27 raspberrypi homebridge[530]: cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Dec 02 12:11:27 raspberrypi homebridge[530]:     Last message repeated 1 times
Dec 02 12:11:27 raspberrypi homebridge[530]: [h264 @ 0x310a370] nal_unit_type: 7(SPS), nal_ref_idc: 3
Dec 02 12:11:27 raspberrypi homebridge[530]: [h264 @ 0x310a370] nal_unit_type: 8(PPS), nal_ref_idc: 3
Dec 02 12:11:27 raspberrypi homebridge[530]: [h264 @ 0x310a370] nal_unit_type: 5(IDR), nal_ref_idc: 3
Dec 02 12:11:27 raspberrypi homebridge[530]: [h264 @ 0x310a370] Format yuv420p chosen by get_format().
Dec 02 12:11:27 raspberrypi homebridge[530]: [h264 @ 0x310a370] Reinit context to 1280x720, pix_fmt: yuv420p
Dec 02 12:11:27 raspberrypi homebridge[530]: cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Dec 02 12:11:27 raspberrypi homebridge[530]: [h264 @ 0x31d2160] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
Dec 02 12:11:27 raspberrypi homebridge[530]: cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Dec 02 12:11:27 raspberrypi homebridge[530]: [h264 @ 0x30ebc70] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
Dec 02 12:11:27 raspberrypi homebridge[530]: cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
Dec 02 12:11:27 raspberrypi homebridge[530]: [h264 @ 0x31c1070] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
Dec 02 12:11:27 raspberrypi homebridge[530]: [h264 @ 0x31c5b00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 3
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph 0 input from stream 0:0 @ 0x31969f0] Setting 'video_size' to value '1280x720'
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph 0 input from stream 0:0 @ 0x31969f0] Setting 'pix_fmt' to value '0'
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph 0 input from stream 0:0 @ 0x31969f0] Setting 'time_base' to value '1/90000'
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph 0 input from stream 0:0 @ 0x31969f0] Setting 'pixel_aspect' to value '0/1'
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph 0 input from stream 0:0 @ 0x31969f0] Setting 'sws_param' to value 'flags=2'
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph 0 input from stream 0:0 @ 0x31969f0] Setting 'frame_rate' to value '301/12'
Dec 02 12:11:27 raspberrypi homebridge[530]: [graph 0 input from stream 0:0 @ 0x31969f0] w:1280 h:720 pixfmt:yuv420p tb:1/90000 fr:301/12 sar:0/1 sws_param:flags=2
Dec 02 12:11:27 raspberrypi homebridge[530]: [format @ 0x3109420] Setting 'pix_fmts' to value 'yuv420p'
Dec 02 12:11:27 raspberrypi homebridge[530]: [AVFilterGraph @ 0x310b010] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
Dec 02 12:11:27 raspberrypi homebridge[530]: [12/2/2019, 12:11:27] [Camera ffmpeg] Stopped streaming

I had the same issue, running homebridge as service, until someone recommended me to add the user to the video group:
sudo usermod -a -G video <username>
where <username> is the user homebridge use it to run. In my case it's like this:
sudo usermod -a -G video homebridge
Afterwards, don't forget to restart homebridge.

Hi, thank you for the answer, but unfortunately, it doesn't work :(

This is so helpful, thanks! I just rebuilt my homebridge setup from scratch and I was missing this last piece of information. Maybe we should add it to the wiki > https://github.com/KhaosT/homebridge-camera-ffmpeg/wiki/Raspberry-PI

I had the same issue, running homebridge as service, until someone recommended me to add the user to the video group:

After months of dealing with buggy video streams and trying everything this finally worked!
Cheers for this info.


Update README

include screenshots
start to finish setup instructions
description of project inner workings

fixed in b218c07fc232d37903a549ad384402e58295f1b9 and previous commit


Expense: Handle taxes and customData for drafts

Fix https://github.com/opencollective/opencollective/issues/6558

@kewitz done, thanks for the catch!
It would be nice to figure out how to share this logic between regular, draft, and recurring expenses. It's a lot to expect from developers to remember that they need to update all these files.


Multiple query strings with the same name

Another test has been added for query string parser about multiple query strings with the same name

Pull Request Test Coverage Report for Build 269

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.003%) to 97.355%

Totals

Change from base Build 265:
0.003%

Covered Lines:
1546

Relevant Lines:
1588

💛  - Coveralls


[v1.0.1] Possible bug: debug displayname (and styled-components v2).

Hello,
I just upgraded (babel-plugin-styled-components) from v:1.0.0 to v:1.0.1 and now the plugin dons't add the components' name to the class name.
Div with v:1.0.1:

Div with v:1.0.0:

Using:
"styled-components": "~2.0.0-8"
Babelrc:
.babelrc
{
"presets": [
"es2015",
"react"
],
"plugins": [
"transform-object-rest-spread",
"transform-class-properties",
"styled-components",
"react-hot-loader/babel"
]
}
I know that this plugin might not be compatible with styled components 2, but would like to let you know and see if I'm doing something wrong.

@HejdesGit this plugin is meant to work with styled-components 2. I haven't  tried the 1.0.1 and I think I will wait a bit.

The plugin is actually only compatible with v2. Do you have a reproduction repo of this somewhere? It should definitely not be happening.

@mxstbr sorry, no reproduction repo. Didn't have time to set one up. But the latest release (1.1.1) is fixing my problem. Hope that's good enough. If the problem arise again I'll try to investigate further and set up a repo.

Component name was dropped from the id starting from 1.0.1. Yes, it had to be mentioned explicitly. Starting from 1.1.0 ssr flag is disabled by default, so id is not generated at all, which "fixes" the problem because id is now generated by the runtime, not the plugin. see #44


khal: 0.11.2 -> 0.11.3

Diff: https://github.com/pimutils/khal/compare/refs/tags/v0.11.2...v0.11.3
Changelog: https://github.com/pimutils/khal/releases/tag/v0.11.3
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 288544 run on x86_64-linux 1

2 packages built:

khal
khal.dist


Add ssh-keyscan for github.com and gitlab.com to default dockerfiles

mkdir -p -m 0700 ~/.ssh && ssh-keyscan gitlab.com github.com | sort > ~/.ssh/known_hosts
So working with private repos on these hosts doesn't require extra keyscans in the users dockerfiles
refs #9 #8 #7

Note, sort isn't actually necessary here.


Listing embeds in admin > assets section takes very long or times out

Description
Viewing the embeds folder in the admin section takes very long or times out.  The database is identical on production and dev.
Currently using the plugin blocks the client-facing site while the thumbnails load in the admin section. This is a serious bug -- the site becomes unavailable for up to a minute every time the admin tries to add an embed to an entry.
Production: CraftCMS <IP_ADDRESS>, plugin v. 1.0.2
45 seconds to load 43 item list of youtube embeds
Switching to this asset folder, I see the spinning wheel for 46 seconds on production, and then the list appears.
DEV: CraftCMS <IP_ADDRESS>, plugin v. 2.0.2, also with 1.0.2
Times Out
The list does not appear and I see 4 pop-up error messages "unknown error" after 55 seconds of waiting.
After the failure, the browser js console shows:
Failed to load resource: the server responded with a status of 504 (Gateway Time-out)
/index.php?p=admin/actions/element-indexes/get-elements:1

Unchecked runtime.lastError: The message port closed before a response was received.
assets:1

Failed to load resource: the server responded with a status of 504 (Gateway Time-out)
/index.php?p=admin/actions/element-indexes/get-elements:1

I was planning to update the plugin on production but it is failing on DEV so I will wait for resolution. How can I help you diagnose?
Steps to reproduce

Upload 43 youtube embeds
Switch to the assets folder
very slow listing or timeout

Or, click to add an embed to an entry -- the assets dialog behaves in a similar fashion.
Other information

Embedded Assets version: 1.0.2 is very slow, 2.0.2 fails
Craft CMS version: <IP_ADDRESS>

I noticed that if I remove the plugin and reload the page, the file list appears instantaneously. This makes me think that the issue is with the thumbnail images which I presume get pulled from the provider (youtube in this case).
Is there a way to switch these thumbnails off?

@spicywebau, is there a plan to address this?
Using the plugin blocks the site including client page while the thumbnails load in the admin section. So the site produces timeouts every time the plugin is used. This is a serious bug.

Hi @andreimoment,
Embedded Assets v2.0.3 adds the showThumbnailsInCp setting.  This setting is enabled by default, but can disable showing embedded asset thumbnails in the control panel when set to false in Embedded Assets' config file at config/embeddedassets.php (create it if it doesn't exist), for example in the following way:
<?php

return [
    'showThumbnailsInCp' => false,
];

Hope this resolves your issue 😃

With Embedded Assets 2.0.5, with thumbnails disabled it takes over 48 seconds for 49 embedded videos. I experience a long delay and then they all show at once... maybe this is not a thumbnail issue but some kind of delay in the query?
How can I help you debug this?
The 48 second request(s):
https://www.site.com/index.php?p=admin/actions/debug/default/view&tag=5d0155...
https://www.site.com/index.php?p=admin/actions/users/get-remaining-session-time&dontExtendSession=1

For comparison, getting the list of over 300 image assets takes 2 seconds (the built-in Craft image assets with thumbnails on Google Drive).


fix Getting Started link in README

This pull request fixes the invalid getting started link listed in the readme.
Previous value

Getting Started`

Fix value

Getting Started

Current coverage is 97.82%

Merging #801 into master will decrease coverage by -0.08% as of cb87f85

@@            master    #801   diff @@
======================================
  Files           72      72
  Stmts         3635    3635
  Branches       287     287
  Methods          0       0
======================================
- Hit           3559    3556     -3
- Partial         33      36     +3
  Missed          43      43

Review entire Coverage Diff as of cb87f85

Powered by Codecov. Updated on successful CI builds.

Thanks. 👍


beforeRouteEnter next callback does not fire before Server Side Rendering occurs

What problem does this feature solve?
The beforeRouteEnter's next callback does not resolve when using vue-server-renderer's renderToString until after the server side rendering has occurred.
Since there is no vue instance data in beforeRouteEnter, there is no easy way to map the data that is loaded to an instance of an application.  Instance data is first introduced in the next(vm: Vue) callback, but at this point it is too late for Server Side Rendering since the app has already rendered.
This leads to the case where I (and potentially others) are having to use dirty hacks to map initial data.  In my case, the only solution I have found that works is:

Create a global map holding initial data with a key of Route code
Save the initial data to this map in beforeRouteEnter code
Associate the initial data with an application instance in a router.beforeResolve callback code
Retrieve the initial data from the root application instance in the component's created lifecycle hook code

This is quite a lengthy process that would be unnecessary if beforeRouteEnter's next(vm: Vue) callback resolved before Server Side Rendering took place.
What does the proposed API look like?
Maybe the next(vm: Vue) callback could be adapted to run as part of a component's created lifecycle hook.

The strategies to get asynchronous data are a bit different when doing SSR. Hav you read this chapter in our (Recently re-written) SSR guide?
https://ssr.vuejs.org/en/data.html

Yes I did start with that guide but encountered issues. When I run:
Promise.all(matchedComponents.map(Component => {... the variable Component is a Vue Configuration object, not a Vue Component instance. Therefore I cannot access any instance members since the component has not been instantiated.
I am using typescript with https://github.com/vuejs/vue-class-component so maybe that's why there is a difference in the guide and the result I'm getting

That's not the point. It's totally correct that what you get is a Component Config object, because the whole exercise is meant to get async data before the app is rendered (and by that, the component instances are created.
The difference is that the guide shows how to do that with Vuex, while you try to do that for local state.
I haven't actually attempted this, but think you have a rocky road ahead.
The problem isn't so much getting the async data into the local state on the server - I think that can be done.
The problem is that you have to send that state to the client inside of the HTML page somehow, and make the component read that information into its local state on the client again synchronously.
Otherwise, the received DOM from the server will not match the virtualDOM rendered ion the client, and hydration will fail.
So taking care of all asnc state through vuex makes that much easier.

I've figured all of that other stuff out.  The only problem I'm having is I can't get a reference from the beforeRouteEnter function back to the Vue Application before server side rendering completes.
I've tried many things:

next(vm: Vue) resolves after server side rendering completes, so that cannot be used
The example on the SSR page returns a Component Config object with no instance or application data
The Route object does not hold a reference back to the router that instantiated it, so even if I save a reference  to the application in the base router, I can't get back to that object

The main problem is no way to get data loaded from beforeRouteEnter to the component instance before server side rendering completes.  This is because there is no clear way to get from beforeRouteEnter to the application or component instances when the component and router are defined in separate modules.

Question: Is there a particular reason that you don't want to use Vuex?
Idea: Replace the Component Option's data fuction with one that refers to the async result via a closure ...

The issue is much more fundamental than this.  Regardless of whether I use Vuex or not, I cannot access the Application Instance or the Component Instance before Server Side Rendering has completed, so there is no way to put the data into Vuex or some other variable associated with the Application/Component before Server Side Rendering has completed.
Maybe this will help:
beforeRouteEnter completes in Component's Module
no way to reach Component Instance (this is expected, it has not been instantiated)
no way to reach Application Instance since Component and Application are in separate modules
             ↓
router.OnReady fires in Application's Module
all matched components are still Configurations
no way to call a method on a component; they have not been instantiated
             ↓
Server Side Rendering completes
             ↓
beforeRouteEnter callback next(vm: Vue) is called
finally have access to Component Instance
can access Application Instance through component.$root
too late because Server Side Rendering has already completed

Regardless of whether I use Vuex or not, I cannot access the Application Instance or the Component Instance before Server Side Rendering has completed, so there is no way to put the data into Vuex or some other variable associated with the Application/Component before Server Side Rendering has completed.

Now I'm confused.
The whole point of vuex is that the data does not have to be added to the component's local state, but the component fetches what it needs from the vuex store. We don't need to access the component instance.
That's what's being described in the link that I provided and that you said you already read, and that's what you can see in action in the vue-hackernews demo project.
So I really don't understand why you would feel that you have to access the component instance. What exactly is not working for you with the vuex approach.

I can't access the application instance either, so I can't load any data from beforeRouteEnter into Vuex. I know other projects like Vue Hackernews do. I haven't  read  the source for that  but I'll  take  a look. In my project the vue component is in a different module than the application, so maybe that's the difference.
I think it's important for Vue Router to provide a way to access the Component Instance, which will in turn allow access to the $root application instance before server side rendering completes. It allows for powerful code design patterns such as MVC.

I can't access the application instance either, so I can't load any data from beforeRouteEnter into Vuex.

I'll ask a third time: Why would you think you need to use this way?

I think it's important for Vue Router to provide a way to access the Component Instance, which will in turn allow access to the $root application instance before server side rendering completes.

This would require for server-side rendering to evaluate the application render process asynchonously, which would be much less efficient, and make streaming the result impossible, so that probably won't happen.

It allows for powerful code design patterns such as isomorphic MVC.

I don't understand this one. Vue doesn't have a contcept of a controller to begin with, and using MVC on the client is largely considered to be an antipattern - even Ember is dropping it.

I'll ask a third time: Why would you think you need to use this way?

Here is the scenario.  beforeRouteEnter gets called in a separate module.  Here is the code.  This data needs to get saved somewhere and eventually needs to end up back in the Component.
The next callback resolves after Server Side Rendering completes, so the data cannot be associated with the component in the next callback.  I am proposing that the next callback get called earlier, before server side rendering is complete.

This would require for server-side rendering to evaluate the application render process asynchonously, which would be much less efficient, and make streaming the result impossible, so that probably won't happen.

I'm aware that access to the Application or Component cannot happen in beforeRouteEnter.  That's why it would be great if the next callback worked before Server Side Rendering completed.

I don't understand this one. Vue doesn't have a contcept of a controller to begin with, and using MVC on the client is largely considered to be an antipattern - even Ember is dropping it.

In my case I am considering a Controller to be a component that is routed to.
If you have the time, it'd be great to review my project and process.  I think it'll make the problem with getting Server Side Rendering data mapped in a routed component much clearer.  Here's the main files:

Module to create Application
Routes
Components that are loaded by Router (I call these Controllers)
Server Side Renderer

As you'll see, there is no easy way to get the data frombeforeRouteEnter into the Components in PostController.ts.  I'm open to any solution, but I've scoured documentation and code and have been unable to find an obvious one.

I'm aware that access to the Application or Component cannot happen in beforeRouteEnter. That's why it would be great if the next callback worked before Server Side Rendering completed.

As I explained, that would require an asynchronous  rendering process, which, in all likelyhood, will not happen.
Skimming over your code as best I can (not a typescript-user - yet), I don't see anything that could not be solved with vuex-centic patterns explained in the documentation. Please review the SSR documentation as well as the hackernews demo.
Instead of loading posts in the beforeRouteEnter, you would add an asyncData hook, dispatch an action in that hook to get the data, and only rtender the whole app afer all those hooks have been resolved.
Then each route component ("controller") can get ita data synchronously from the store, so the whole app can be rendered synchonously and streamed to the client.

Instead of loading posts in the beforeRouteEnter, you would add an asyncData hook, dispatch an action in that hook to get the data, and only rtender the whole app afer all those hooks have been resolved.

Unfortunately this just doesn't work with TypeScript.  Components are classes, not objects.  So even though I add a asyncData method to my component, here's what I get:
router.onReady(async () => {
                const matchedComponents = router.getMatchedComponents()
                if (!matchedComponents.length) {
                    reject({ code: 404 })
                }

                matchedComponents.map(Component => {
                    console.log(Component)
                    if ((Component as any).asyncData) {
                        (Component as any).asyncData()
                    }
                })

                resolve()
            })

Logs:
function VueComponent(options) {
      this._init(options);
}

There is no access to the asyncData method of the component in router.onReady

Here is a solution that may work.  What if we add a navigation property from Route back to the Router that instantiated it?
Presently in beforeRouteEnter, to holds the Route that we are navigating to.  If I could call to.Router, I could save a reference to the VueX store in the Router.  So I could save the data into VueX by calling to.Router.Store or something like that.

Unfortunately this just doesn't work with TypeScript. Components are classes, not objects.

Yes and no. It seems you have your own decorators to map the class methods etc into a  Vue.extend()? vue-class-component does soemthign similar. In either way, the result is an extended Vue instance with the component options as defaults.

There is no access to the asyncData method of the component in router.onReady

The default options of that constructor are accessible via Constructor.options:
https://jsfiddle.net/Linusborg/uwtsL71r/

The options of a Vue constructor are accessible via Constructor.options

Wow, I was totally unaware.  I will use this approach.
Also, thanks for sharing all of the design aspects of vue-router and why they make beforeRouteEnter a bad choice for async app data in Server Side Rendering.  It was unclear to me at first why you wouldn't want to do this, but I've learned a lot in this thread 😄


Setting up all-contributors

@all-contributors please add @MichaelJolley for documentation, ideas, design and code.