Strings not properly escaped for JSON

I'm trying to use the generated client classes to send strings to a GraphQL endpoint. These string sometimes contain special characters that need to be escaped in JSON, such as TAB, CR, LF. But, they are sent as-is, so the JSON sent to the server is malformed.
For example, in this query
mutation activateMigration {
  activate(activation: {
    tenants: ["	some-string	"]
  })
}

the string contains a TAB character. I would expect the string to be escaped, so that the JSON sent to the server would look like this JSON generated by graphiql:
{"query":"mutation activateMigration {\n  activate(activation: {\n    tenants: [\"\tsome-tenant\t\"]...

but instead, it still contains the TAB characters:
{"query":"mutation activateMigration {\n  activate(activation: {\n    tenants: [\"	some-tenant	\"]...

graphql-java seems to escape all strings according to the JSON rules, as does graphiql. But this library only escapes ". Is this a bug, or working as intended?

Hello,
It’s not an intended feature.
In other words, it’s a bug.

Can this correction wait for august, around the 20th ?
Étienne

Alright, in that case I would like to prepare a PR myself to get rid of that unintended feature. Impact on our side is that we have to escape all strings that might contain those characters before passing them to the MutationExecutor.

I’ll be glad to accept this PR.
:)


click.exceptions.BadParameter:  is not a valid boolean when incorrect configs are in place

I follow the README.md document step-by-step and once sample configuration files are mentioned I errorneously copied them to their respective directories:
 newman  ~  curl https://raw.githubusercontent.com/cloudsmith-io/cloudsmith-cli/master/cloudsmith_cli/data/credentials.ini > .config/cloudsmith/credentials.ini
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   501  100   501    0     0    533      0 --:--:-- --:--:-- --:--:--   532

 newman  ~  curl https://raw.githubusercontent.com/cloudsmith-io/cloudsmith-cli/master/cloudsmith_cli/data/config.ini > .config/cloudsmith/config.ini
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   737  100   737    0     0    485      0  0:00:01  0:00:01 --:--:--   485^[[A

And I noticed that cloudsmith CLI immediatelly started to crash:
 newman  ~  cloudsmith token
Usage: cloudsmith [OPTIONS] COMMAND [ARGS]...

Traceback (most recent call last):
  File "/home/newman/.local/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/newman/.local/lib/python3.7/site-packages/click/core.py", line 1134, in invoke
    Command.invoke(self, ctx)
  File "/home/newman/.local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/newman/.local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/newman/.local/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/newman/.local/lib/python3.7/site-packages/cloudsmith_cli/cli/decorators.py", line 86, in wrapper
    opts.load_config_file(path=config_file, profile=profile)
  File "/home/newman/.local/lib/python3.7/site-packages/cloudsmith_cli/cli/config.py", line 187, in load_config_file
    return config_cls.load_config(self, path, profile=profile)
  File "/home/newman/.local/lib/python3.7/site-packages/cloudsmith_cli/cli/config.py", line 117, in load_config
    config = cls.read_config()
  File "/home/newman/.local/lib/python3.7/site-packages/click_configfile.py", line 401, in read_config
    cls.process_config_section(config_section, storage)
  File "/home/newman/.local/lib/python3.7/site-packages/click_configfile.py", line 445, in process_config_section
    section_data = parse_config_section(config_section, schema)
  File "/home/newman/.local/lib/python3.7/site-packages/click_configfile.py", line 270, in parse_config_section
    value = param.parse(value)
  File "/home/newman/.local/lib/python3.7/site-packages/click_configfile.py", line 197, in parse
    return self.type.convert(text, self, ctx=None)
  File "/home/newman/.local/lib/python3.7/site-packages/click/types.py", line 355, in convert
    self.fail('%s is not a valid boolean' % value, param, ctx)
  File "/home/newman/.local/lib/python3.7/site-packages/click/types.py", line 69, in fail
    raise BadParameter(message, ctx=ctx, param=param)
click.exceptions.BadParameter:  is not a valid boolean

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/newman/.local/bin/cloudsmith", line 10, in <module>
    sys.exit(main())
  File "/home/newman/.local/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/newman/.local/lib/python3.7/site-packages/click/core.py", line 734, in main
    e.show()
  File "/home/newman/.local/lib/python3.7/site-packages/click/exceptions.py", line 70, in show
    echo('Error: %s' % self.format_message(), file=file, color=color)
  File "/home/newman/.local/lib/python3.7/site-packages/click/exceptions.py", line 101, in format_message
    param_hint = self.param.get_error_hint(self.ctx)
AttributeError: 'Param' object has no attribute 'get_error_hint'

I suggest two things: (1) catch the exception and make the error message in this case more sensible, (2) perhaps put the paragraph on sample config files after the cloudsmith token procedure.
I fixed my system by removing those sample config files and running cloudsmith token.
I am on Fedora 30 with Python 3.7 and cloudsmith 0.16 from PyPI via pip-3.

Hi @Mno-hime thanks for the detailed report! We'll look into this ASAP and issue updated instructions in the README.
Catching the exception is definitely a good idea, I'll check with the team to see if we can fix that in the very near future.

Fixed now on master by #18 - Thank you @Mno-hime!


gh-dash: 4.7.3 -> 4.8.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/dlvhdr/gh-dash/releases.
meta.description for gh-dash is: Github Cli extension to display a dashboard with pull requests and issues
meta.homepage for gh-dash is: https://github.com/dlvhdr/gh-dash
meta.changelog for gh-dash is: https://github.com/dlvhdr/gh-dash/releases/tag/v4.8.0
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 4.8.0 with grep in /nix/store/ab9av9sxp1dyf7yfdmhb8qlgl0n94pr5-gh-dash-4.8.0
found 4.8.0 in filename of file in /nix/store/ab9av9sxp1dyf7yfdmhb8qlgl0n94pr5-gh-dash-4.8.0

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

gh-dash

Instructions to test this update (click to expand)

Either download from the cache:
nix-store -r /nix/store/ab9av9sxp1dyf7yfdmhb8qlgl0n94pr5-gh-dash-4.8.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nixpkgs-update-cache.nix-community.org/' \
  --option trusted-public-keys '
  nixpkgs-update-cache.nix-community.org-1:U8d6wiQecHUPJFSqHN9GSSmNkmdiFW7GW7WNAnHW0SM=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The nixpkgs-update cache is only trusted for this store-path realization.)
For the cached download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A gh-dash https://github.com/r-ryantm/nixpkgs/archive/43eed30b66bee7523f5b907a72127d41a1afde50.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/43eed30b66bee7523f5b907a72127d41a1afde50#gh-dash

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/ab9av9sxp1dyf7yfdmhb8qlgl0n94pr5-gh-dash-4.8.0
ls -la /nix/store/ab9av9sxp1dyf7yfdmhb8qlgl0n94pr5-gh-dash-4.8.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review

x86_64-linux

:white_check_mark: 1 package built:

gh-dash

Maintainer pings
cc @amesgen for testing.

[!TIP]
As a maintainer, if your package is located under pkgs/by-name/*, you can comment @NixOS/nixpkgs-merge-bot merge to automatically merge this update using the nixpkgs-merge-bot.

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

@NixOS/nixpkgs-merge-bot merge


Failed to load resource https://runner-pro.codewars.io/

I have been experiencing this issue intermittently since Red was rolled out.  (I am not a Red member.)
Sometimes when clicking Run Examples or Attempt, my code is attempted to be executed on a server that throws this error.  Sometimes I can fix it by logging out and back in, but other times I just have to save my code and come back to the site later.  I have experienced this perhaps a dozen times with multiple problems, though I do not think it is associated with any particular problems specifically.
Another anecdote is that when it does happen, it doesn't seem to affect every problem.  I can open up new problems in other tabs and keep coding, but refreshing the page for the problems that are "stuck" on the broken server connection does not seem to save them.
I have experienced it both in the latest stable versions of Chrome and Safari.
The Codewars status page lists all servers as operational with no issues.
Failed to load resource: net::ERR_CONNECTION_REFUSED

https://runner-pro.codewars.io/?utm_source=codewars&utm_medium=web&utm_campaign=kata_trainer#theme=dark&congrats=true&pro=false

@jhoffner Is it fixed?

Yes

Awesome.  Thanks again.

Awesome.  Thanks again.
Just ranked up to 4 kyu this morning 😎


Retry() does not work properly

The .retry() does not work properly (not sure if only for me or globally). I've simulated the test failure and it is not being executed after failure. In the terminal, the result is highlighted in green with the text "OK 0 passed". Below is a screen from the terminal:

You can see that the test should fail because we've filled the field with "435,00" and we are expecting to see "222,00"
In addition, I'm attaching the source code below:
Scenario.only(
  'You can save editing of custom product without any changes',
  async ({ I, posPage, device, adminCalendarNavigationPage }) => {
    const { proSalon: salon, logInToAdmin } = await I.getEnvironment({ I });
    await logInToAdmin(salon.owner);
    I.click(adminCalendarNavigationPage.posNavigation);

    if (device.isMobile) {
      I.click(posPage.mobileCheckoutButton);
    }
    const { customProductName: productName, customProductPrice: productPrice } =
      posPage.createCustomProduct(salon.country);

    if (device.isMobile) {
      I.click(posPage.checkout.tooltip.mobileButton);
    } else {
      I.click(posPage.checkout.tooltip.button);
    }
    I.click(posPage.checkout.tooltip.editItem);
    I.click(posPage.addCustomItemDialog.saveButton);
    const productPrice2 = '222,00'
    I.see(productName, posPage.checkout.itemName);
    I.see(`${productPrice2} €`, posPage.checkout.totalPrice);
  },
).retry(2);

I've also tried with { retries: 2 } - but unfortunately with the same result.
I'm working on CodeceptJS + Playwright.

I've the same issue with retry(X) for scenario.
With retry, and a failed assert like I.see() with wrong value lead to this strange ending

Than without retry(X) we have a correct assert error message like this

Otherwise, it's seems that no screenshot are taken when test is failing with retry option enable.
Any idea ?

@Horsty80
I've resolved my problem - it was not working due the .only  flag situated next to the Scenario - otherwise it is working properly. Not sure if it will help you but I wanted to let you know about that ;)

Thanks @JakubKasprzyk
I think is still an issue, if we use .only for debugging the retry() shouldn't conflict.
I need to check but I think in allure report I lose the assert error message (without only)
=/


PermissionError

When running triples = cl.extract_triples(sents), Python throws a permission error as:
File "C:\ProgramData\Anaconda3\lib\site-packages\pyclausie-0.1-py3.6.egg\pyclausie\SubprocessBackend.py", line 72, in extract_triples
    os.remove(input_file.name)

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\ADMIN123\\AppData\\Local\\Temp\\tmpuim6i8ma'

Please solve it and update.

Hi altfasst,
My code does not run on Windows because I use the NamedTempFile method. If you use on Linux or Mac, then everything should work.


showcase filenames

Right now the filenames for the showcase projects are contribution{$number}.json, I think I would actually prefer it to be showcase${number}.json? This would require:

[ ] Renaming all current json files.
[ ] Changing build and tests to look for showcase instead of contribution
[ ] Changing form submission script to generate showcase instead of contribution
[ ] Updating guides

What does everyone think?

@shiffman Is this something you still wanted done? LMK

It's low priority and I worry there will be unintended consequences I'm not thinking of but yes, I think this would be a good update for the site!

I'm fairly certain this can be easily and safely done, your checklist looks complete to me.
Super nitpicky... the only thing I'm wondering is if the semantics make sense for the code base. A showcase of user contributions/creations works, but a showcase of showcases doesn't sound right to me.
I did see in the website maintenance guide that there are instructions to port older challenges from the https://github.com/skaser85/thecodingtrain_website_data repo. Maybe this should be wrapped up first?

It's low priority

Feel free to tag me on GitHub or Discord with anything else of higher priority, I'll see if I can help.

Apologies for the delay, I'm back and working on Coding Train projects for 2023!

Super nitpicky... the only thing I'm wondering is if the semantics make sense for the code base. A showcase of user contributions/creations works, but a showcase of showcases doesn't sound right to me.

I see what you are saying. My thought was that since it's the Passenger Showcase, it's more clear to have the files associated with the showcase called showcase! "contribution" is more of a dry, technical term and isn't clear what it is for.
But maybe I should just let it be?
In any case, the porting of challenges and addition of new content will always be ongoing so I'm happy to for this to be worked on in the shorter term!
I think one challenge with this issue is that it has to be done all at once as to not cause conflicts with new showcase submissions that are coming in. @klinegareth ran into this when working on it in #443.

I see what you are saying. My thought was that since it's the Passenger Showcase, it's more clear to have the files associated with the showcase called showcase! "contribution" is more of a dry, technical term and isn't clear what it is for.

Yeah, I can see that. These JSON files live in a "showcase" directory, though, so they are not completely lacking context. "Contribution" to me was fine, but it's not the most accurate word for what it is, and it lacks the whimsy of the Coding Train aesthetic.
How would you model the property in the Tracks and Challenges schemas for example? It's currently showcase: [Contribution]. To me, it doesn't make too much sense to pluralize "showcase", and it's way more confusing to make it showcase: [Showcase]. What is this a showcase of?
Would simply adding a "showcase" or "passenger" prefix help?
For fun, I wrote down a few ideas and synonyms that might be helpful and inspire some alternative to "contribution". Feel free to completely dismiss!

Art-world related

submission
showpiece
exhibit
creation
oeuvre
study
feat
concoction
brainchild

Every contributed piece is directly inspired by a coding challenge

remix
variant, variation
inspiration
interpretation
exploration
riff
take
response

Train metaphors

passenger destination, travel history, travel log, passport stamps, luggage (where passengers come from and where are they going)
crossroad, railroad switch (passengers starts from the coding challenge prompt, but branch out and make choices to create something unique)

I think one challenge with this issue is that it has to be done all at once as to not cause conflicts with new showcase submissions that are coming in. @klinegareth ran into this when working on it in https://github.com/CodingTrain/thecodingtrain.com/pull/443.

Makes sense. There aren't stale contribution PRs at this point (except for #490) which helps. I wrote some code to rename the contribution content files that could be temporarily added in the codebase and re-run until everything is settled. https://gist.github.com/fturmel/5e36c280fa4e67fbb2015498546cdf80
I would suggest that all the code changes be done first in a PR, and that when everything is ready you can be the one that locally runs the script that renames 2500+ content files and contribute that last commit to the PR just before merging. It'll make the PR easier to review, and less likely to have conflicts with the main branch.
It seems like updating the guides (copy + screenshots) would be the most time-consuming part of all this.

Thanks @fturmel for all of your thoughts on this! I'm feeling more like maybe the name of the files doesn't matter so much and "contribution" describes it well. Perhaps more my issue was with that word appearing on the website itself which feels a bit "cold" and "technical." I made some minor edits just now in #959.
I could imagine changing to "submission" instead of "contribution" or "showcase-submisson" / "passenger-contribution" or something like that as well, but I'm not sure it's worth it. And am happy to just close this issue? What do you think?

Sure, that makes sense and I agree that we can close the issue if you're happy with the approach.
If you ever change your mind, it's totally doable to refactor the project to use the term "submission" instead. Just keep in mind that it's not just the JSON file names that will need to be updated. Lots of internals (variable names, GraphQL schema and queries), the guides (copy and screenshots), content unit tests, submission lambda function, etc.

Sure, that makes sense and I agree that we can close the issue if you're happy with the approach.
If you ever change your mind, it's totally doable to refactor the project to use the term "submission" instead. Just keep in mind that it's not just the JSON file names that will need to be updated. Lots of internals (variable names, GraphQL schema and queries), the guides (copy and screenshots), content unit tests, submission lambda function, etc.

Thanks, yes I underestimated the ripple effects of this idea so I think it's best to leave as is! We can always revisit / reopen if need be! Thank you for the helpful advice and for being so thoughtful about it!


Consider BootLeaf

We might consider using the BootLeaf mobile friendly template found [here] (https://github.com/bmcbride/bootleaf). Great for building web mapping apps, leverages Bootstrap, Leaflet Map API and typeahead.js. Quick and easy to use...

Thumbs up. Good design.


Forgot to add two functions.

You had forgot to add the "visit_MinusNode" and the "visit_PlusNode" in the interpreter file.

Thanks for putting this, @Ungedummt

For me, it gives me an error saying init() missing 1 required positional argument: 'value'

I forked this project. You can find it here.


opts are optional in useSearch but treated as required

Describe the bug
If you don't pass an empty object to useSearch you get an error.
https://github.com/TanStack/router/blob/83d8bff6009629d1ca4091dcdf602cc1835f7dd1/packages/router/src/react.tsx#L455
Should be something like opts ?? {} or make the type opts required.
Your Example Website or App
NA
Steps to Reproduce the Bug or Issue
NA
Expected behavior
NA
Screenshots or Videos
NA
Platform
NA
Additional context
No response

are you using the latest version? I can't reproduce this one, or can you provide an example that reproduce this? please

oh yeah, you're right, let me fix it

This should now be fixed.


Implementing the server with SQLite

I can't be bothered to find the specific pull request, but it's pretty obvious this issue is closed.


update isochrone with bugfix

@stepankuzmin
Hey
Me again ;) It will be great to push the fix here.

Thanks for PR! You can use latest urbica/galton docker image with this patch applied.

Thank you very much. Can you make an extra tag for this version?

I've released v5.18.0


invalid change of license

Hi Gábor,
I'm the original creator of JSAP.  It has been brought to my attention that your fork references the MIT license for JSAP, but I have released JSAP under the LGPL, which is not compatible with MIT.  I assume this is a simple mistake but must require you to change your LICENSE.txt accordingly.
I hope JSAP has been useful to you.
Best regards,
Marty

Sorry, Marty, I missed this "little" part. Should be fixed by now.
Cheers,
Gabor

Thanks for the quick response!  Much appreciated.
Cheers,
Marty


[Question] Searching within a Date Range (Python Module)

Initial Check

Make sure you've checked the following:

[x] Python version is 3.6 or higher.
[x] Using the latest version of Twint.
[x] I have searched the issues and there are no duplicates of this issue/question/request.

Command Ran
since="2017-01-01"
until="2017-02-01"
search_str="Microsoft"
c = twint.Config()
c.Search = search_str
c.Since=since
c.Until=until
c.Lang='en'
c.Store_json =True
c.Stats=False
c.Custom = ["id", "date", "time", "timezone", "user_id", "username", "tweet", "replies", "retweets", "likes", "hashtags", "link", "retweet", "user_rt", "mentions"]
c.Output = "tweets_"+str(search_str)+''+str(since)+''+str(until)+".json"
Description of Issue
Ran the above code for different months but interestingly only for months with 31 days it does not stop the search on the first day of the month (in the above case "2017-01-01") rather it starts going to December 2016. I don't face this problem with 30 day  months or February. This pattern makes me think there is a bug somewhere but I am unable to find it.
Environment Details
Anaconda on Linux (Windows 10 Linux subsystem)

Try using the parameter timedelta,  set it up to 2 for example and verify if it works or not

Can you explain the logic behind that? One more observation that I failed to mention in the last comment was that I for a 31-day month if I run the query without considering the last day for example  since=2017-08-01 and until=2017-08-30 the tweets dont overspill to the previous month.

If the query is very large result and you specify more than 30 days...  You won't get tweets for all the days but only for few days
It's a known problem on twitter side.  If you use timedelta parameter to 2 you got all of them.
It's just a test,  try it and see if using that parameter also helps you

But datecheck func should work, will look into it

Closing since is a known issue


No available targets are compatible with triple "wasm32-unknown-unknown-wasm"

I'm stuck on the following error:
$ python3 build.py --target webgpu --debug-dump
Load cached module from dist/vicuna-7b-v1/mod_cache_before_build.pkl and skip tracing. You can use --use-cache=0 to retrace
Dump mod to dist/vicuna-7b-v1/debug/mod_before_build.py
Dump mod to dist/vicuna-7b-v1/debug/mod_build_stage.py
Traceback (most recent call last):
  File "/workspaces/web-llm/build.py", line 200, in <module>
    build(mod, ARGS)
  File "/workspaces/web-llm/build.py", line 166, in build
    ex = relax.build(mod_deploy, args.target)
  File "/home/vscode/.local/lib/python3.10/site-packages/tvm/relax/vm_build.py", line 325, in build
    return _vmlink(builder, target, tir_mod, ext_libs, params)
  File "/home/vscode/.local/lib/python3.10/site-packages/tvm/relax/vm_build.py", line 239, in _vmlink
    lib = tvm.build(tir_mod, target=target, runtime=_autodetect_system_lib_req(target))
  File "/home/vscode/.local/lib/python3.10/site-packages/tvm/driver/build_module.py", line 281, in build
    rt_mod_host = _driver_ffi.tir_to_runtime(annotated_mods, target_host)
  File "tvm/_ffi/_cython/./packed_func.pxi", line 331, in tvm._ffi._cy3.core.PackedFuncBase.__call__
  File "tvm/_ffi/_cython/./packed_func.pxi", line 262, in tvm._ffi._cy3.core.FuncCall
  File "tvm/_ffi/_cython/./packed_func.pxi", line 251, in tvm._ffi._cy3.core.FuncCall3
  File "tvm/_ffi/_cython/./base.pxi", line 181, in tvm._ffi._cy3.core.CHECK_CALL
tvm._ffi.base.TVMError: Traceback (most recent call last):
  6: TVMFuncCall
  5: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::runtime::Module (tvm::runtime::Map<tvm::Target, tvm::IRModule, void, void> const&, tvm::Target)>::AssignTypedLambda<tvm::{lambda(tvm::runtime::Map<tvm::Target, tvm::IRModule, void, void> const&, tvm::Target)#6}>(tvm::{lambda(tvm::runtime::Map<tvm::Target, tvm::IRModule, void, void> const&, tvm::Target)#6}, std::string)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)
  4: tvm::TIRToRuntime(tvm::runtime::Map<tvm::Target, tvm::IRModule, void, void> const&, tvm::Target const&)
  3: tvm::codegen::Build(tvm::IRModule, tvm::Target)
  2: tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::runtime::Module (tvm::IRModule, tvm::Target)>::AssignTypedLambda<tvm::codegen::{lambda(tvm::IRModule, tvm::Target)#1}>(tvm::codegen::{lambda(tvm::IRModule, tvm::Target)#1}, std::string)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)
  1: tvm::codegen::LLVMModuleNode::Init(tvm::IRModule const&, tvm::Target const&)
  0: tvm::codegen::LLVMTargetInfo::GetOrCreateTargetMachine(bool)
  File "/workspace/tvm/src/target/llvm/llvm_instance.cc", line 302
TVMError:
---------------------------------------------------------------
An error occurred during the execution of TVM.
For more information, please see: https://tvm.apache.org/docs/errors.html
---------------------------------------------------------------
  Check failed: (target_machine_ != nullptr) is false: No available targets are compatible with triple "wasm32-unknown-unknown-wasm"

I found a reference to this error here, but since I'm using the nightly TVM build recommended in the readme I'm not clear what I can do to fix this.

I got a similar error, I tested it both on wsl2 and Ubuntu 22.04

I have the same problem. It occurs on centos

Same issue. Really need some help over here.

Likely have to do with the llvm shipped do not come with wasm, you can try to swap out the LLVM and build from source in a branch say here https://github.com/mlc-ai/relax

I encountered the same issue on my Ubuntu22 instance. Building relax from source helps me resolve this issue. you can refer to the guide https://tvm.apache.org/docs/install/from_source.html#developers-get-source-from-github.  I also follows the steps in the script https://github.com/mlc-ai/relax/blob/mlc/tests/scripts/task_web_wasm.sh to build web wasm.


compiled RMSNorm

Stack from ghstack (oldest at bottom):

-> #442

On Llama3 8B model, no AC
compiled_rmsnorm is ~9% faster than rmsnorm, but ~2% slower than fused_rmsnorm.
Please see below for details.
rmsnorm

compiled_rmsnorm

fused_rmsnorm

@tianyu-l should we provide some guidance on when to use compiled RMSNorm vs. fused RMSNorm?


Workspace - App crashed when send attachment offline and delete workspace from other device

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.70-1
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4538783&group_by=cases:section_id&group_order=asc&group_id=306202
Email or phone of affected tester (no customers<EMAIL_ADDRESS>Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:

Open app
Create a workspace
Navigate to announce room
Send any message to the room
Disable internet connection
Send an image attachment to the room
Sign in with the same account on other device and delete recently created workspace
Enable internet connection on main device

Expected Result:
Error should be displayed
Actual Result:
App crashed when user sent attachment offline, deleted workspace from other device and returned online on main device
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[x] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[x] MacOS: Desktop

Screenshots/Videos
https://github.com/Expensify/App/assets/115492554/9b5beaad-2f01-4a4e-9393-5f70516d3514

View all open jobs on GitHub

@lschurr I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

We think this issue might be related to the #collect project.

Production
https://github.com/Expensify/App/assets/115492554/79c88301-f4d3-4dd2-8bea-b3ea42da5572

I don't think that solution makes sense. You should be able to go back and load all the older messages from an archived chat and the solution proposed will break that, no?
Did anyone find the actual code that makes it crash?

@izarutskaya why is there no desktop video? Also, desktop can't crash, so not sure what is happening in desktop...
Is it also not working on web? If so, can you share console logs?

ok did the reproduction steps and not seeing a crash in web, seeing the loading older action issues described above (this is on staging, not main).

Posted in slack here https://expensify.slack.com/archives/C01GTK53T8Q/p1714747609951879

@izarutskaya I don't see any email in the issue. You should always include the email and other relevant data in the issue report (such as workspaceID, reportID, etc). That way I can retrieve logs for cases where I can't reproduce the issue like this one.

@suneox did you see this:

I don't think that solution makes sense. You should be able to go back and load all the older messages from an archived chat and the solution proposed will break that, no?

I think this might be fixed by https://github.com/Expensify/App/pull/41558. Would someone be able to test out that PR?
My other theory is that the chat doesn't have a CREATED action as the last one for some reason so we don't know that we are at the end of the chat (see https://github.com/janicduplessis/Expensify-App/blob/10fbd6a53177685702bdfa90e102163506e263cf/src/pages/home/report/ReportActionsView.tsx#L320-L321). I have a proposal to have the backend return whether more data is available but it is more of a medium term fix (https://github.com/Expensify/App/issues/41153).

  if (isArchivedRoom && filteredReportActions.length === 1 && filteredReportActions[0].actionName === CONST.REPORT.ACTIONS.TYPE.CLOSED) {

I think this part is wrong as it only works if the actions is of length 1 but if the other app adds a comment before deleting the workspace I still see the broken behavior.
I also don't quite understand what that code is doing exactly.

Proposal
Please re-state the problem that we are trying to solve in this issue.
GetOlderActions is called in a loop and new messages are never loaded.
What is the root cause of that problem?
There is a bug in getContinuousReportActionChain where if there is an optimistic action in the middle of a chat we incorrectly detect a gap in the chat. This causes a smaller array to be returned and then this incorrect array is used for pagination.
New messages loaded by GetOlderActions are never included in the chat because of the incorrect gap so we keep calling GetOlderActions in a loop since we never reach the CREATED action, which is the first message in all chats.
For more context and debugging of this problem you can read through this chat in Slack.
What changes do you think we should make in order to solve the problem?
We need to fix getContinuousReportActionChain to properly ignore optimistic actions since the backend does not know about them and previousReportActionID will be wrong.
What alternative solutions did you explore? (Optional)

I already have a PR ready for the fix since I think this is a deploy blocker https://github.com/Expensify/App/pull/41644

@iwiznia Tester login credentials (email) -<EMAIL_ADDRESS>Let me please include a console logs..

Verified that this is fixed and we didn't use any C+ services so I'm closing this out


[FEATURE] Theme toggle

Description

Any modern web app these days support a light and dark themes, this website is no different
We need a toggle switch to toggle between light and dark themes using CSS variables.
Initially the value should be system default theme.
Then the changed theme value must be stored in local storage.

Screenshots

Additional information

Always use styled components instead of plain CSS and MUI components.

Make sure to read the CONTRIBUTING and SETUP docs before proceeding
Happy contributing. 💐
Star my other Repositories here

Hey, I can do that. But, I'm having problem setting up the project locally on my machine. Can you please clarify steps to run the project on my machine locally ? Actually, I've never worked on MongoDB ever. So, it's my first time. I can also redesign the whole UI of  which I have an idea of.

Can you please clarify steps to run the project on my machine locally ?

Sure, the steps for setting up the project is in SETUP. Let me know where you're facing any issue.

Actually, I've never worked on MongoDB ever. So, it's my first time.

That won't be an issue right now because in this PR I just want a toggle switch similar to the one given above.

I can also redesign the whole UI of which I have an idea of.

If you have any new design implementation for the theme switch suggest some below which would fit the existing UI.

Okay. I just got it running on my machine myself after some puzzling. Assign me the toggle issue. I'll do it and and make a PR when done. If there is any, you can let me know of time boundation. Thanks.

Toggle is done. But, I'd like to make few more changes to keep the look and feel of the UI relevant. Like in Dark mode the background image doesn't looks good enough. So, I want to remove to background image with a plain color palette. Do you approve it ? Also, some minor changes like some elements border radius, padding etc.

But, I'd like to make few more changes to keep the look and feel of the UI relevant. Like in Dark mode the background image doesn't looks good enough. So, I want to remove to background image with a plain color palette.

Sure, but I would suggest to keep these 2 tasks in 2 seperate Issues. You can create a new issue to work on it after discussing on it. If you have made the toggle switch I would like to view it before you create a PR. Can you show the screenshots here?

Sure ! Here they are :
On LightMode :

On DarkMode :

The toggle button is based on React States. Easy to implement in any component and page. React Context API has been used to make it available everywhere. Suggest if changes needed.

This looks good but what happened to the font? The font was not like this before. It was simple

This looks good but what happened to the font? The font was not like this before. It was simple

I have not changed any font or font related setting. It is running from your remote server, so maybe it's unable to access the real font that you have already set up. Maybe, it's not available offline on my machine. The font settings are default.

Sure, please make the PR. Any changes will be suggested after viewing on the preview generated by vercel

I have made the PR. But, it is not generating preview even there is no merge conflict.

Sure! I have requested some changes


feature/1022

Added the Modal component page and added the link to the sidebar.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

modal header styles don't match the component design.


Uncaught ssl.CertificateError

Hi,
I ran into an uncaught ssl.CertificateError today, as I tried to download a video from ZDF-Mediathek. It seems that ZDF is using a bad certificate, but youtube-dl crashes badly.
I entered:
youtube-dl "http://www.zdf.de/ZDFmediathek#/beitrag/video/2696938/Hacker,-Freaks-und-Funktion%C3%A4re"
(It may not work from outside germany. Furthermore in a few days the movie is likely to be removed due to (de)publication guidelines)
I end up with:
[ZDF] 2696938: Downloading video info
[ZDF] 2696938: Downloading SMIL file
[ZDF] 2696938: Downloading f4m manifest
[ZDF] 2696938: Downloading m3u8 information
[ZDF] 2696938: Downloading m3u8 information

Followed by this traceback:
Traceback (most recent call last):
  File "/usr/bin/youtube-dl", line 9, in <module>
    load_entry_point('youtube-dl==2016.1.9', 'console_scripts', 'youtube-dl')()
  File "/usr/lib/python3.5/site-packages/youtube_dl/__init__.py", line 410, in main
    _real_main(argv)
  File "/usr/lib/python3.5/site-packages/youtube_dl/__init__.py", line 400, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1677, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 665, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 312, in extract
    return self._real_extract(url)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/zdf.py", line 194, in _real_extract
    return self.extract_from_xml_url(video_id, xml_url)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/zdf.py", line 141, in extract_from_xml_url
    video_url, video_id, 'mp4', m3u8_id=format_id, fatal=False))
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 975, in _extract_m3u8_formats
    fatal=fatal)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 371, in _download_webpage_handle
    urlh = self._request_webpage(url_or_request, video_id, note, errnote, fatal)
  File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 351, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 1890, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.5/urllib/request.py", line 465, in open
    response = self._open(req, data)
  File "/usr/lib/python3.5/urllib/request.py", line 483, in _open
    '_open', req)
  File "/usr/lib/python3.5/urllib/request.py", line 443, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.5/site-packages/youtube_dl/utils.py", line 830, in https_open
    req, **kwargs)
  File "/usr/lib/python3.5/urllib/request.py", line 1240, in do_open
    h.request(req.get_method(), req.selector, req.data, headers)
  File "/usr/lib/python3.5/http/client.py", line 1083, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python3.5/http/client.py", line 1128, in _send_request
    self.endheaders(body)
  File "/usr/lib/python3.5/http/client.py", line 1079, in endheaders
    self._send_output(message_body)
  File "/usr/lib/python3.5/http/client.py", line 911, in _send_output
    self.send(msg)
  File "/usr/lib/python3.5/http/client.py", line 854, in send
    self.connect()
  File "/usr/lib/python3.5/http/client.py", line 1237, in connect
    server_hostname=server_hostname)
  File "/usr/lib/python3.5/ssl.py", line 376, in wrap_socket
    _context=self)
  File "/usr/lib/python3.5/ssl.py", line 747, in __init__
    self.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 983, in do_handshake
    self._sslobj.do_handshake()
  File "/usr/lib/python3.5/ssl.py", line 633, in do_handshake
    match_hostname(self.getpeercert(), self.server_hostname)
  File "/usr/lib/python3.5/ssl.py", line 296, in match_hostname
    % (hostname, ', '.join(map(repr, dnsnames))))
ssl.CertificateError: hostname 'zdf-hdios-none-i.zdf.de' doesn't match either of 'a248.e.akamai.net', '*.akamaihd.net', '*.akamaihd-staging.net', '*.akamaized.net', '*.akamaized-staging.net'

I use archlinux, and youtube-dl version

2016.01.09

You are using an outdated version of youtube-dl. Read our FAQ if you have troubles updating.
They use broken certificates for some m3u8 URLs (that are skipped in latter versions of youtube-dl).

If you are not willing to update unsecure solution is to use --no-check-certificate.

Thank you for the quick response.


ERROR: Could not build wheels for pyjq,  unable to install pyjq in mac os

Traceback (most recent call last):
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in
main()
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 261, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/private/var/folders/vj/chqg3bd53m53ljhxcftmrqym0000gn/T/pip-build-env-1zulvgpg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 230, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/private/var/folders/vj/chqg3bd53m53ljhxcftmrqym0000gn/T/pip-build-env-1zulvgpg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir
self.run_setup()
File "/private/var/folders/vj/chqg3bd53m53ljhxcftmrqym0000gn/T/pip-build-env-1zulvgpg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 267, in run_setup
super(_BuildMetaLegacyBackend,
File "/private/var/folders/vj/chqg3bd53m53ljhxcftmrqym0000gn/T/pip-build-env-1zulvgpg/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 97, in
setup(
File "/private/var/folders/vj/chqg3bd53m53ljhxcftmrqym0000gn/T/pip-build-env-1zulvgpg/overlay/lib/python3.10/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/private/var/folders/vj/chqg3bd53m53ljhxcftmrqym0000gn/T/pip-build-env-1zulvgpg/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 299, in run
self.run_command('build')
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "setup.py", line 32, in run
self._build_libjq()
File "setup.py", line 57, in _build_libjq
self._build_lib(
File "setup.py", line 74, in _build_lib
subprocess.check_call(command, cwd=lib_dir)
File "/Users/junwo/.pyenv/versions/3.10.0/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['autoreconf', '-i']' returned non-zero exit status 2.
ERROR: Failed building wheel for pyjq
Failed to build pyjq
ERROR: Could not build wheels for pyjq, which is required to install pyproject.toml-based projects
this is my a part of error log.
i have installed flex, bison (3.0 or newer), libtool, make, automake and autoconf .
but i could not install pyjq

Yeah, same thing for me on intel macOS running Monterey and Ubuntu 21.04 and Python 3.9.9 and Python 3.8.12.

I was able to manage using Python 3.9.9 and updated dependencies.   Hope that helps.
Downloading pyjq-2.5.2-cp39-cp39-macosx_11_0_x86_64.whl (33 kB)
Installing collected packages: pyjq
Successfully installed pyjq-2.5.2
Looks like yours may be failing on the autoconf dependency.
I'm using the latest build from homebrew for that:
autoconf --version
autoconf (GNU Autoconf) 2.71
Hope that helps.   Best of luck!

I was able to manage using Python 3.9.9 and updated dependencies.   Hope that helps.
Downloading pyjq-2.5.2-cp39-cp39-macosx_11_0_x86_64.whl (33 kB)
Installing collected packages: pyjq
Successfully installed pyjq-2.5.2
Looks like yours may be failing on the autoconf dependency.
I'm using the latest build from homebrew for that:
autoconf --version
autoconf (GNU Autoconf) 2.71
Hope that helps.   Best of luck!

I also had trouble building the wheel, the subprocess ran into problems with this message:
Can't exec "aclocal": No such file or directory at /opt/homebrew/Cellar/autoconf/2.71/share/autoconf/Autom4te/FileUtils.pm line 274.

I managed to solve the issue by installing automake:
brew install automake


reset duration doesnt work on android / nspanel

Hi,
I´m running this script on an android based nspanel pro with the following config:
view_timeout:
  timeout: true
  default: home
  duration: 30000
  users:
    - nspanel
    - nspanel-bathroom
  reset:
    mouse_move: true

My ui is designed, that I dont have to scroll and just click entities with tap_action: navigate to move to the next site/view.
In this keys my nspanel switches to "home" after 30s, even if i just clicked a button a second ago.

This seems to be a general issue when input is not sent toe a specific container.
I cannot tell details unfortunately but I observed the same issue when for example clicking in zigbee2mqtt (embedded in HA). It seems the timeout is not reset then.


Add a FastAPI tutorial to our docs

Given we already have a Django and a Flask tutorial, it'd be nice to create a FastAPI one.

Outline proposal:
Prerequisites

Set up the project in VS Code:

Create and open folder.
Set up a virtual environment with the create environment command.
Create main.py application.

Run and Debug the Project

Using Pydantic to define received payloads.
Using the automatic interactive docs at /docs to interact with the API.
Using Pylance’s Inlay hints.
Configuring the debugger.
Adding breakpoints.
Inspecting variables.
Running code in the debug console.

Set up and Run Tests

Creating tests.
Setting up the test explorer.
Running tests from the test explorer.

Next Steps
Links to:

Devcontainers
Deploying to Azure

Thanks for getting started on the outline!
For pre-requisites, would it still make sense for us to have two paths where the other one would be to use Codespaces using a template repo (to be refined and hosted under Microsoft account)? We can link to the devcontainer from there too, since the template repo will be based on devcontainers.
In terms of the tutorials project, are we still thinking of ChatGPT plugin--maybe towards the end? If so, we should probably add debugging tutorial for that in Codespaces as well.

For pre-requisites, would it still make sense for us to have two paths where the other one would be to use Codespaces using a template repo (to be refined and hosted under Microsoft account)?

+1 I would love it if we could include this, whether it is the default set-up or a path like you phrased it.


Remove lodash

e7295c33776be6199b826817934dadad5d0f9bb1 brought lodash dependency in.
It is not useful to add the whole 20KB (gzipped!) library just to make Redux work. Would you still consider redux lightweight after the bloated dependency is in?
Can I make a pull request reverting the change?

It does not add 20KB.

My bad then.


generators cleanup

Move generators implementation into Utility/Generator.c
closure and classobj is now generator's attribute
Add support for gi_running
Close generator on deallocation

I really like the way it's now implemented. Appears much cleaner than before.
The last commit copies quite a bit too much of CPython's internals for my personal taste, but I guess it's hard to do differently without sacrificing semantic compliance. Let's get it in and see about the rest later.


The clear icon (x) in the right side of the input only appear in IE

The x clear icon appears in IE when the input gets the focus, but doesn't appear on Chrome or FF.
Is that the -ms-clear pseudo element? https://stackoverflow.com/questions/14007655/remove-ie10s-clear-field-x-button-on-certain-inputs

I may ask this in a different way: is there a way to make it appear on FF or Chrome?

Tell me if it's not even inputmask scope issue.

@MrCsabaToth ,
This behavior comes from IE and is out of scope.


Weird characters when dealing with hyphen

I have a barcode that I printed with Dymo label maker that translates to QC-157. But when I tried to scan it in your playground I get:
[onScan]: Code: QC½157 Quantity: 1

If I activate the OnKeyDetect you can see that it is clearly reading some characters wrong.  For example it is reading 16 as the first character and there is no ASCII equivalent of 16
It is also reading ASCII 189 for the symbol - which is not true.
My scanner is working just fine because if I open a notepad and try to scan the same code I get:
QC-157

Hi! Use the keyCodeMapper callback to map the key codes to the desired characters. See example here: https://github.com/axenox/onscan.js#decoding-key-codes.
The trouble is, that the key codes from the JavaScript events depend on a lot of things: the hardware, the operating system, the virtual keyboard used, the keyboard layout, etc. I found, that it practically impossible to decode all codes reliably. Using a custom key code mapper, that deals with the issues of your specific hardware is much easier!

This worked really well for me
keyCodeMapper: function(e) { return e.key || String.fromCharCode(e.keyCode); },

This worked really well for me
keyCodeMapper: function(e) { return e.key || String.fromCharCode(e.keyCode); },

Because 16 is the code of the shift key, with the @Emsal92 code I have a weid result with the word "Shift" between each character in the result string. It's the way it recreates an uppercase code ( does lowercase code even exist ? ), for example for the code /123 I had Shift/Shift1Shift2Shift3.
by simply exclude 16 in the keyCodeMapper callback, I have a good result.
keyCodeMapper: (e) => ((e.keyCode === 16) ? '' : e.key || String.fromCharCode(e.keyCode)),

This keyCodeMapper  mess  makes onscan useless with QR codes.


UserSignIn: Error 1040: Too many connections  (issue when opening gitea from anywhere)

Gitea version (or commit ref):  1.12.0+dev-70-gbf847b93
Git version: gbf847b93
Operating system: U18.04
Database (use [x]):

[ ] PostgreSQL
[x] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[x] No
[ ] Not relevant

Log gist:

Description
After updating gitea to latest state from https://dl.gitea.io/gitea/master/ (todays master, atm HEAD commit) I keep getting authentication errors (even though I do not even try to login i.e. in browser).
When go to frontpage, press F5 I get in log: (https://MYHOST/user/login?redirect_to=)
==> gitea.log <==
2020/03/31 00:24:37 ...m.io/xorm/core/db.go:154:QueryContext() [I] [SQL] SELECT `id`, `type`, `name`, `is_actived`, `is_sync_enabled`, `cfg`, `created_unix`, `updated_unix` FROM `login_source` WHERE (is_actived = ? and type = ?) [true 6] - 761.432µs
2020/03/31 00:24:37 routers/user/auth.go:131:SignIn() [E] UserSignIn: Error 1040: Too many connections

also I cannot push any commits:
Gitea: Internal Server Error
Unable to get repository: gsantner/myscripts Error 1040: Too many connections
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists

Note that I'm the only user of the server, service freshly started and it's not due fail2ban.
Screenshots

This is an error your DB server is providing, so even though Gitea may be newly installed you could have other services connecting to it. If you run the query SHOW FULL PROCESSLIST as root mysql/mariadb user you'll see a list of connections against your DB and their current state.

Hi, I'm using gitea since it's beginning, and updating to master build weekly. This is definitely no "new installation", and it has been working fine for long time. My previous version was gitea-2020-03-28 running fine, so there must be a merged change these days resulting in this bug.
Notice that when I change from gitea-2020-03-31 to gitea-2020-03-28 it works again.

My apologies I understood service freshly started as a a new installation. Either way, what does your DB say? Both of those days have had multiple PRs merged and so it is hard to say what specifically changed between those two days, would you be able to provide the specific commit for each of the versions?

Working version: .12.0+dev-49-g1737fca22
Broken version from today: 1.12.0+dev-70-gbf847b93

Here is the diff between those two commits: https://github.com/go-gitea/gitea/compare/1737fca22...bf847b93

Normal state, currently nothing doing on gitea, running last weeks build:

ok error is there again, so seems like it starts showing up after some time

When gitea started, some internal tasks may work. Maybe we should focus on that.


[JAV-435] starter to make spring cloud applications be able to config…

…ured by config center
Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[x] Each commit in the pull request should have a meaningful subject line and body.
[x] Format the pull request title like [JAV-XXX] Fixes bug in ApproximateQuantiles, where you replace JAV-XXX with the appropriate JIRA issue.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Run mvn clean install to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[x] If this contribution is large, please file an Apache Individual Contributor License Agreement.

@acsukesh  I just check the PR, why did you remove the whole module?

Coverage increased (+0.07%) to 86.803% when pulling 53274934e72f1a16d9ad663cac3f88531dc9541d on acsukesh:master into 9f50bc0efa7d8ef38b3be2b589718428777cc04f on ServiceComb:master.

@WillemJiang the config code is now in foundation-config-cc module, so deleted the duplicate code.

Actually, deleted code is duplicate of what foundation-config module has done.


chore: update dependencies

:tada: This PR is included in version 3.8.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Add basic authentication support

Couldn't find any examples or tests of basic authentication of OkHttp with mockwebserver. Would be nice  to add that feature

https://github.com/square/okhttp/wiki/Recipes#handling-authentication

Yes, but what about server-side? I am talking about checking valid authentication within MockWebServer...

I had the same issue: only return a valid MockResponse when the request contained a "Authorization" header. Spent some hours with that, but the solution is very simple:
okhttpclient seems to try the url first without authorization header and only if the response is "HTTP/1.1 401 Not Authorized" it will add the header and make a new request. So you need to set a dispatcher at MockWebServer and in case of missing "Authorization" header, return new MockResponse().setStatus("HTTP/1.1 401 Not Authorized")


Link external documentation and render description as markdown

Hey there @dweber019!
Thanks a lot for your work on the Spectral Lint Plugin for Backstage! 🙌
In this PR I'm proposing to render a documentation URL link when that is available. Also to render the description as markdown (I think that is how some rules are documented out there, the spotlight one was added as an example).
Please let me know your thoughts on that! 🙂

@jeffersongirao Thanks 🙏 will have a look at this over the weekend. Cheers

@dweber019 thanks for the quick reply! I've just added the changeset 👍.

@jeffersongirao Should be available in a few minutes.


Has more detailed rpc usage documentation

Search before asking

[X] I searched in the issues and found nothing similar.

Motivation
I found some rpc on the page
https://docs.sei.io/develop/resources.
After clicking in, there are also some API usage methods, but some methods are still unclear. Can you make a more detailed copy like eth the rpc interface document.

Solution
No response
Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?

[ ] I'm willing to submit a PR!

Why does this rpc link not support the api of the cosmos sdk?
rpc: https://rpc.atlantic-2.seinetwork.io/
cosmos api example: link: /cosmos/tx/v1beta1/txs?events=tx.height=3784118


Non-critical error when launching GUI

Description:
When opening the GUI without custom annotations performed before, I get an error in the step "Loading saved custom annotations..."
Way to reproduce:
Open GUI of timelapse file after performing segmentation and tracking with the seg module
(Optional) Link to data to reproduce error:
No response
Terminal output:
Loading saved custom annotations...
2023-05-10 12:33:07,931 [INFO] Loading saved custom annotations...
Traceback (most recent call last):
  File "C:\Users\mairhoermann\Documents\phd-code\Cell_ACDC\cellacdc\load.py", line 62, in read_json
    json_data = json.load(file)
  File "C:\Users\mairhoermann\Anaconda3\envs\acdc_temp\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\Users\mairhoermann\Anaconda3\envs\acdc_temp\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Users\mairhoermann\Anaconda3\envs\acdc_temp\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\mairhoermann\Anaconda3\envs\acdc_temp\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 11 (char 12)

2023-05-10 12:33:07,970 [INFO] Traceback (most recent call last):
  File "C:\Users\mairhoermann\Documents\phd-code\Cell_ACDC\cellacdc\load.py", line 62, in read_json
    json_data = json.load(file)
  File "C:\Users\mairhoermann\Anaconda3\envs\acdc_temp\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "C:\Users\mairhoermann\Anaconda3\envs\acdc_temp\lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "C:\Users\mairhoermann\Anaconda3\envs\acdc_temp\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\mairhoermann\Anaconda3\envs\acdc_temp\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 2 column 11 (char 12)

Version information:
No response

Hi Beno, we already fixed this but now you have a corrupted file that you need to delete manually. After deletion you should not see this error anymore.
Please delete the file Cell_ACDC/cellacdc/temp/custom_annotations.json
This file holds all the custom annotations that have been created in the past to allow you loading a custom annotation that you setup in a different position. I recently found that this file can be corrupted and I fixed it so it should not be corrupted anymore in the future (after you delete it). Let me know if it works thanks!

Great, that worked!


Generate eloquent-filter not working

I've just installed the package and run the artisan make:eloquent-filter command but it isn't working. It looks like it's because the latest package changes need to be published to reflect the master branch. The old artisan eloquent-filter:make works.
(Nice work, btw. I really like the approach).

Thank you @alasdairmackenzie
New release is published and seems to have fixed the issue. Completely new to the open-source world here. Is it every time master branch gets updated a new release should be published?
Is there any good resources to learn how to manage open-source project? I've tried following the Laracasts series but I believe there he would just merge/push to master branch and it would become available

fixed with the new release - clsosing


started on sg dengue, malaria data analysis - extracted data from csv to pandas dataframe

Downloaded csv containing weekly infectious disease cases from data.gov.sg
Created ipython notebook to analyse the data
Created a pandas dataframe from the csv file and sliced them into malaria and dengue data frames

It would be good to add filters to ignore prompt numbers and program outputs in ipython notebook.

It would be good to add filters to ignore prompt numbers and program outputs in ipython notebook.


XHR failed: Provide more context in error

Error: XHR failed
at y.onerror (https:/<REDACTED: user-file-path>:74:790)

Go to Errors Site

@sandy081 not sure who owns this component.
This is pretty consistently one of the top errors, we should look into providing more details here:
https://github.com/microsoft/vscode/blob/9ed8c261d0b5c63c412c32238e1063fe9caf88b1/src/vs/base/parts/request/browser/request.ts#L26-L28
If possible a stack would be great, otherwise more details like options.url would be helpful. It's not clear to me whether the URL will be redacted or not but that would help identify where the error is coming from exactly so we can make targeted fixes.
Searching for the error I see some screenshots with the error showing up in the UI:

Assigning to @deepak1556 as he got expertise in network stack.


Python/Core: Regression in grpcio, error parsing of content-type metadata

What version of gRPC and what language are you using?
For these grpcio (python) versions (client side), the problem described below appears or doesn't appear:

1.53.0 works
1.53.1 works
1.53.2 works
1.54.0 works
1.54.2 works
1.54.3 works
1.55.3 doesn't work (prior 1.55 versions have been yanked)
1.56.0 works
1.56.2 doesn't work
1.57.0 doesn't work
1.58.0 doesn't work
1.59.0 doesn't work
1.60.0 doesn't work

What operating system (Linux, Windows,...) and version?
Mac or Linux (client)
Linux (server)
What runtime / compiler are you using (e.g. python version or version of gcc)
Python 3.10.7 (also tested with 3.9)
What did you do?
Our python client library makes calls to a gRPC backend deployed behind a GCP load balancer (GCE Ingress on GKE) with GCP Identity Aware Proxy (IAP) enabled. The client authenticates lazily in the sense that it first tries an unauthenticated request/request with cached credentials and if this doesn't work, refreshes credentials and tries again:
class AuthUnaryInterceptor(grpc.UnaryUnaryClientInterceptor):
    ...
    def intercept_unary_unary(...):
        """
        Intercepts unary calls and adds auth metadata if available. On Unauthenticated, resets the token
        and refreshes and then retries with the new token.
        """
        updated_call_details = self._call_details_with_auth_metadata(client_call_details)
        fut: grpc.Future = continuation(updated_call_details, request)
        e = fut.exception()
        if e:
            if e.code() == grpc.StatusCode.UNAUTHENTICATED or e.code() == grpc.StatusCode.UNKNOWN:
                self._authenticator.refresh_credentials()
                updated_call_details = self._call_details_with_auth_metadata(client_call_details)
                return continuation(updated_call_details, request)
        return fut

For newer versions of grpcio, the rpc fails even though the lazy authentication works and the server responds with "the right payload".
Minimal working example
We condensed the relevant logic from the client library into this example greeter client:

Click me
import os
import typing
import grpc
import ssl
from collections import namedtuple

import greeting_pb2
import greeting_pb2_grpc

def bootstrap_creds_from_server(endpoint: str) -> grpc.ChannelCredentials:
    """
    Retrieves the SSL cert from the remote and uses that.
    """
    # Get port from endpoint or use 443
    endpoint_parts = endpoint.rsplit(":", 1)
    if len(endpoint_parts) == 2 and endpoint_parts[1].isdigit():
        server_address = (endpoint_parts[0], endpoint_parts[1])
    else:
        server_address = (endpoint, "443")
    cert = ssl.get_server_certificate(server_address)  # noqa
    return grpc.ssl_channel_credentials(str.encode(cert))

class Authenticator(object):
    def __init__(
        self,
        header_key: str,
    ):
        self._token = None
        self._header_key = header_key if header_key else "authorization"

    def fetch_grpc_call_auth_metadata(self) -> typing.Optional[typing.Tuple[str, str]]:
        if self._token:
            return self._header_key, f"Bearer {self._token}"
        return None

    def refresh_credentials(self):
        token = os.environ.get("TOKEN")
        if not token:
            raise Exception("No token found")
        self._token = token

class _ClientCallDetails(
    namedtuple("_ClientCallDetails", ("method", "timeout", "metadata", "credentials")),
    grpc.ClientCallDetails,
):
    """Wrapper class for initializing a new ClientCallDetails instance."""

    pass

class AuthUnaryInterceptor(grpc.UnaryUnaryClientInterceptor):
    """
    This Interceptor can be used to automatically add Auth Metadata for every call - lazily in case authentication
    is needed.
    """

    def __init__(self, authenticator: Authenticator):
        self._authenticator = authenticator

    def _call_details_with_auth_metadata(
        self, client_call_details: grpc.ClientCallDetails
    ) -> grpc.ClientCallDetails:
        """
        Returns new ClientCallDetails with metadata added.
        """
        metadata = client_call_details.metadata
        auth_metadata = self._authenticator.fetch_grpc_call_auth_metadata()
        if auth_metadata:
            metadata = []
            if client_call_details.metadata:
                metadata.extend(list(client_call_details.metadata))
            metadata.append(auth_metadata)

        return _ClientCallDetails(
            client_call_details.method,
            client_call_details.timeout,
            metadata,
            client_call_details.credentials,
        )

    def intercept_unary_unary(
        self,
        continuation: typing.Callable,
        client_call_details: grpc.ClientCallDetails,
        request: typing.Any,
    ):
        """
        Intercepts unary calls and adds auth metadata if available. On Unauthenticated, resets the token and refreshes
        and then retries with the new token
        """
        # self._authenticator.refresh_credentials()

        updated_call_details = self._call_details_with_auth_metadata(
            client_call_details
        )
        fut: grpc.Future = continuation(updated_call_details, request)
        e = fut.exception()
        if e:
            if (
                e.code() == grpc.StatusCode.UNAUTHENTICATED
                or e.code() == grpc.StatusCode.UNKNOWN
            ):
                self._authenticator.refresh_credentials()
                updated_call_details = self._call_details_with_auth_metadata(
                    client_call_details
                )
                return continuation(updated_call_details, request)
        return fut

 def upgrade_channel_to_proxy_authenticated(in_channel: grpc.Channel) -> grpc.Channel:
    return grpc.intercept_channel(
        in_channel,
        AuthUnaryInterceptor(Authenticator(header_key="proxy-authorization")),
    )

def get_channel(endpoint):
    credentials = bootstrap_creds_from_server(endpoint)

    return upgrade_channel_to_proxy_authenticated(
        grpc.secure_channel(target=endpoint, credentials=credentials)
    )

if __name__ == "__main__":
    endpoint = "<fill in>.com:443"

    stub = greeting_pb2_grpc.GreeterStub(get_channel(endpoint))

    response = stub.greet(greeting_pb2.ClientInput(name="Client", greeting="Hi"))
    print("Greeter client received following from server: " + response.message)

What did you expect to see?
~ TOKEN=eyJh... python client.py
Greeter client received following from server: Hi Client!

What did you see instead?
With a working version, e.g. grpcio==1.53.0:
E1215 14:41:40.919736000<PHONE_NUMBER> hpack_parser.cc:853]               Error parsing metadata: error=invalid value key=content-type value=text/html; charset=UTF-8
Greeter client received following from server: Hi Client!

With a non-working version, e.g. grpcio==1.60.0:
E1215 14:42:40.210358000<PHONE_NUMBER> hpack_parser.cc:999]               Error parsing 'content-type' metadata: invalid value
Traceback (most recent call last):
  File "client.py", line 134, in <module>
    response = stub.greet(greeting_pb2.ClientInput(name="Client", greeting="Hi"))
  File "python3.10/site-packages/grpc/_interceptor.py", line 277, in __call__
    response, ignored_call = self._with_call(
  File "python3.10/site-packages/grpc/_interceptor.py", line 332, in _with_call
    return call.result(), call
  File "python3.10/site-packages/grpc/_channel.py", line 437, in result
    raise self
  File "python3.10/site-packages/grpc/_interceptor.py", line 315, in continuation
    response, call = self._thunk(new_method).with_call(
  File "python3.10/site-packages/grpc/_channel.py", line 1177, in with_call
    return _end_unary_response_blocking(state, call, True, None)
  File "python3.10/site-packages/grpc/_channel.py", line 1003, in _end_unary_response_blocking
    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNKNOWN
        details = "Stream removed"
        debug_error_string = "UNKNOWN:Error received from peer  {created_time:"2023-12-15T14:42:40.385259+01:00", grpc_status:2, grpc_message:"Stream removed"}"
>

What we have discovered so far
1. Wrong content type of response
When unauthenticated, GCP IAP returns content-type text/html. This happens even if one includes ("accept", "application/grpc") headers (which we omitted in the minimal example as it doesn't help).

See screenshots from developer console showing this
Authenticated request:

Unauthenticated request:

2. Lazy authentication actually always successful!
With GRPC_VERBOSITY=debug GRPC_TRACE=all we have figured out that the lazy authentication actually always works and even if the rpc ultimately fails, e.g. with grpcio==1.60.0, the server actually returns the correct payload (including "Hi Client").

Requests/responses for `grpcio==1.53.0`
First request, without token
Request:
 --metadata--
HTTP:0:HDR:CLI:user-agent: grpc-python/1.53.0 grpc-c/30.1.0 (linux; chttp2)
HTTP:0:HDR:CLI::authority: MY_DOMAIN:443
HTTP:0:HDR:CLI::path: /Greeter/greet
HTTP:0:HDR:CLI:WaitForReady: false
HTTP:0:HDR:CLI:grpc-accept-encoding: identity, deflate, gzip
HTTP:0:HDR:CLI:te: trailers
HTTP:0:HDR:CLI:content-type: application/grpc
HTTP:0:HDR:CLI::scheme: https
HTTP:0:HDR:CLI::method: POST
--metadata--

Response:
INCOMING[0x56457019b930;0x564570189020]: Parse 176b last frame fragment with header
HTTP:1:HDR:CLI: :status: 401
HTTP:1:HDR:CLI: content-length: 36
Error parsing metadata: error=invalid value key=content-type value=text/html; charset=UTF-8
HTTP:1:HDR:CLI: content-type: <discarded-invalid-value>
HTTP:1:HDR:CLI: x-goog-iap-generated-response: true
HTTP:1:HDR:CLI: grpc-message: Invalid IAP credentials: empty token
HTTP:1:HDR:CLI: grpc-status: 16
HTTP:1:HDR:CLI: date: Fri, 15 Dec 2023 10:21:17 GMT
HTTP:1:HDR:CLI: alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
INCOMING[0x56457019b930]: DATA:END_STREAM len:36 id:0x00000001

Second request, with token
Request:
--metadata--
HTTP:0:HDR:CLI:user-agent: grpc-python/1.53.0 grpc-c/30.1.0 (linux; chttp2)
HTTP:0:HDR:CLI::authority: MY_DOMAIN:443
HTTP:0:HDR:CLI::path: /Greeter/greet
HTTP:0:HDR:CLI:WaitForReady: false
HTTP:0:HDR:CLI:te: trailers
HTTP:0:HDR:CLI:content-type: application/grpc
HTTP:0:HDR:CLI::scheme: https
HTTP:0:HDR:CLI::method: POST
HTTP:0:HDR:CLI:grpc-accept-encoding: identity, deflate, gzip
HTTP:0:HDR:CLI:proxy-authorization: Bearer
--metadata--

Response:
READ DATA: DATA_BLOCK (redacted)
READ 0x5645701a48c0: 00 00 ... f3 '...Hi Client!...'
INCOMING[0x56457019b930]: HEADERS:END_HEADERS len:83 id:0x00000003
parsing initial_metadata
INCOMING[0x56457019b930;0x5645701bc860]: Parse 83b last frame fragment with header
HTTP:3:HDR:CLI: :status: 200
HTTP:3:HDR:CLI: content-type: application/grpc
HTTP:3:HDR:CLI: grpc-accept-encoding: identity, deflate, gzip
HTTP:3:HDR:CLI: date: Fri, 15 Dec 2023 10:21:17 GMT
HTTP:3:HDR:CLI: via: 1.1 google
HTTP:3:HDR:CLI: alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
INCOMING[0x56457019b930]: DATA len:16 id:0x00000003

Requests/responses for `grpcio==1.60.0` which ultimately fails but still shows `"Hi Client"` in the response!
First request, without token
Request:
--metadata--
HTTP:0:HDR:CLI:user-agent: grpc-python/1.60.0 grpc-c/37.0.0 (linux; chttp2)
HTTP:0:HDR:CLI::authority: MY_DOMAIN:443
HTTP:0:HDR:CLI::path: /Greeter/greet
HTTP:0:HDR:CLI:GrpcRegisteredMethod: (nil)
HTTP:0:HDR:CLI:WaitForReady: false
HTTP:0:HDR:CLI:grpc-accept-encoding: identity, deflate, gzip
HTTP:0:HDR:CLI:te: trailers
HTTP:0:HDR:CLI:content-type: application/grpc
HTTP:0:HDR:CLI::scheme: https
HTTP:0:HDR:CLI::method: POST
--metadata--

Response:
HTTP:1:HDR:CLI: :status: 401
HTTP:1:HDR:CLI: content-length: 36
Error parsing 'content-type' metadata: invalid value
HTTP:1:HDR:CLI: content-type: <discarded-invalid-value> (parse error: INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0'])
HTTP:1:HDR:CLI: x-goog-iap-generated-response: true (parse error: INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0'])
HTTP:1:HDR:CLI: grpc-message: Invalid IAP credentials: empty token (parse error: INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0'])
HTTP:1:HDR:CLI: grpc-status: 16 (parse error: INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0'])
HTTP:1:HDR:CLI: date: Fri, 15 Dec 2023 10:24:42 GMT (parse error: INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0'])
HTTP:1:HDR:CLI: alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 (parse error: INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0'])
INCOMING[0x55a82f6496e0;0x55a82f656fd0]: Parse failed with INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0']
MARK_STREAM_CLOSED: t=0x55a82f6496e0 s=0x55a82f656fd0(id=1) read+write [INTERNAL:Error parsing 'content-type' metadata {stream_id:0}]

Second request, with token
Request:
--metadata--
HTTP:0:HDR:CLI:user-agent: grpc-python/1.60.0 grpc-c/37.0.0 (linux; chttp2)
HTTP:0:HDR:CLI::authority: MY_DOMAIN:443
HTTP:0:HDR:CLI::path: /Greeter/greet
HTTP:0:HDR:CLI:GrpcRegisteredMethod: (nil)
HTTP:0:HDR:CLI:WaitForReady: false
HTTP:0:HDR:CLI:grpc-accept-encoding: identity, deflate, gzip
HTTP:0:HDR:CLI:te: trailers
HTTP:0:HDR:CLI:content-type: application/grpc
HTTP:0:HDR:CLI::scheme: https
HTTP:0:HDR:CLI::method: POST
HTTP:0:HDR:CLI:proxy-authorization: Bearer MY_BEARER_TOKEN
--metadata--

Response:
Notice the content-type: application/grpc, status: 200 and Hi Client!
READ DATA: 17 03 ... 9c '..q.' (redacted)
READ 0x55a82f64d020: 00 .... f2 '...Hi Client!..' (redacted)
INCOMING[0x55a82f6496e0]: HEADERS:END_HEADERS len:83 id:0x00000003
parsing initial_metadata
INCOMING[0x55a82f6496e0;0x55a82f661820]: Parse 83b last frame fragment with header
HTTP:3:HDR:CLI: :status: 200
HTTP:3:HDR:CLI: content-type: application/grpc
HTTP:3:HDR:CLI: grpc-accept-encoding: identity, deflate, gzip
HTTP:3:HDR:CLI: date: Fri, 15 Dec 2023 10:24:43 GMT
HTTP:3:HDR:CLI: via: 1.1 google
HTTP:3:HDR:CLI: alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 (parse error: INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0'])
E1215 18:24:43.269780968  228678 parsing.cc:923]                       INCOMING[0x55a82f6496e0;0x55a82f661820]: Parse failed with INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0']
D1215 18:24:43.269791061  228678 chttp2_transport.cc:2428]             MARK_STREAM_CLOSED: t=0x55a82f6496e0 s=0x55a82f661820(id=3) read+write [INTERNAL:Error parsing 'content-type' metadata {stream_id:0}]

D1215 18:24:43.269876407  228678 hpack_parser.cc:705]                  HTTP:3:???:CLI: grpc-status: 0 (parse error: INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0'])
D1215 18:24:43.269882099  228678 hpack_parser.cc:705]                  HTTP:3:???:CLI: grpc-message:  (parse error: INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0'])

And we see it a couple of times after that:
D1215 18:24:43.269876407  228678 hpack_parser.cc:705]                  HTTP:3:???:CLI: grpc-status: 0 (parse error: INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0'])
D1215 18:24:43.269882099  228678 hpack_parser.cc:705]                  HTTP:3:???:CLI: grpc-message:  (parse error: INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0'])
E1215 18:24:43.269891987  228678 parsing.cc:923]                       INCOMING[0x55a82f6496e0;(nil)]: Parse failed with INTERNAL: Error parsing 'content-type' metadata [type.googleapis.com/grpc.status.int.stream_id='0']
I1215 18:24:43.269897544  228678 parsing.cc:338]                       INCOMING[0x55a82f6496e0]: PING len:8 id:0x00000000
D1215 18:24:43.269902634  228678 parsing.cc:911]                       INCOMING[0x55a82f6496e0;(nil)]: Parse 8b last frame fragment with ping
I1215 18:24:43.269907051  228678 frame_ping.cc:117]                    CLIENT[0x55a82f6496e0]: received ping 2f2
I1215 18:24:43.269912128  228678 tcp_posix.cc:679]                     TCP:0x55a82f522060 notify_on_read

We wonder why the rpc ultimately fails for grpc==1.60.0 even though the refreshing of the credentials works and the server responds with "Hi Client".

3. It works with e.g. grpcio==1.60.0 if one never makes an unauthenticated request
If one never makes an unauthenticated request but refreshes credentials before the first call (by uncommenting the first # self._authenticator.refresh_credentials() in intercept_unary_unary), the rpc works for all versions.

Anything else we should know about your project / environment?

We would appreciate guidance in what to test/look for
We could share full log files (with redacted tokens, addresses, ...)
We could share the server code and K8s manifests for the deployment, ingress, IAP configuration
In a private channel we could share credentials with minimal permissions for our greeter example endpoint which we deployed in an isolated sandbox project.

Thank you!

Hi, thanks providing such a detailed description. It will save us a significant amount of time if all issues have description like this!
I think this is the same issue with https://github.com/grpc/grpc/issues/33935 which you already commented.
Since it's impacting multiple users, I'll reopen that issue and follow up with core team for a fix.

Closing this one as duplicate, we can use the old issue to track the progress.

Thank you for taking a look and reopening the original issue @XuanWang-Amos !


Windows Server 2016 & Windows 10 - 14393.3542

looking for a rdpwrap.ini for14393.3542 (KB4537806)

Did you try this
https://github.com/stascorp/rdpwrap/issues/994#issuecomment-586476722

try this
https://github.com/stascorp/rdpwrap/issues/988#issuecomment-597151413


ovpn

Can ovpn udp forwarding be done?

I assume so because it relies on NAT. I don't use ovpn but if you have a chance to test it let me know if there are any issues.


Security patch for CVE-2022-41723

Update x/net to 0.7 to address CVE-2022-41723.
x/net 0.7 requires Golang 1.17 minimum.  We already compile with Golang 1.20 so this should be okay.

Hrm - what are your thoughts on upgrading to Prometheus 2.43 from your branch?
It looks like this was addressed upstream in https://github.com/prometheus/prometheus/commit/4126985908ebb08a0e93021ef2476fd77731227e and available on 2.43.0.

The problem with Prometheus 2.43 is that after 6 weeks (the Prometheus dev cycle length), 2.43 will not be getting further vulnerability fixes. Personally, I feel like Prometheus 2.37 makes more sense because it is an LTS release [1] and it has this vulnerability fix already too. 2.37 has less of a chance of breaking a customer's Prometheus deployment because it's not as large of a jump.
[1] https://prometheus.io/docs/introduction/release-cycle/

Oh that works too. Do you have a link you can point me to where you found that 2.37 was patched with this fix?

I have a 2.37 branch: https://github.com/GoogleCloudPlatform/prometheus/tree/TheSpiritXIII/release-2.37.6-gmp
From a git blame the version bump was done here: https://github.com/GoogleCloudPlatform/prometheus/commit/607fcd5266ee2d77884afcc7eaac3fcbc39ef25a

Cool - I vote we use that

👍🏽

Let's go!


Netlify CMS - Why does this link crash

cc: @william-liebenberg
Hi @pierssinclairssw,
This link is crashing the Netlify CMS editor.

Figure: The crash that occurs

Please investigate and fix this
Verify that the format of rules is correct when the PR occurs from Netlify for both new rules and updates to rules

Thanks,
-Brady
AB#61011

Hi,

Please investigate and fix this

Done - This was caused by a mistake in the Netlify config file.

Verify that the format of rules is correct when the PR occurs from Netlify for both new rules and updates to rules

Done - After fixing the config file, the format was correct
Thanks
-Brady


Exclude unremovable roles like nitro booster from jail "remove other roles" feature

thanks @robstolarz

lgtm

Aww I wanted to review, to get out of work :(


Add dynamic matrix

Instead of passing std::vector<std::array<T, N>> I added a new class as_matrix that allow passing data with size defined at runtime. The class is only an interface and all operations are read only.
For example, if the user has the data stored in std::vector<std::pair<float, float>>, we can easily pass it without having to copy to a new container:
auto matrix = dkm::as_matrix(reinterpret_cast<float*>(data.data()), data.size(), 2, false);
auto res = km::kmeans_lloyd(matrix, k);

Or if the data is an armadillo matrix (Eigen, etc) it is even easier:
auto matrix = dkm::as_matrix(data.memptr(), data.n_rows, data.n_cols);
auto res = km::kmeans_lloyd(matrix, k);

I think this approach is much better than the current one. For now, I only added the class and changed dkm.hpp (since I don't know if this will get merged and this is the only relevant part for me). One performance issue we have is as_matrix::row returning by value, but this can be easily fixed.

Hi, thanks for your contribution!
This looks similar to an idea I had for a custom matrix data structure. I'll have a more detailed look at it over this weekend.

Just to close this, I think mdspan is a better alternative.

Hi, did this simply stall? Looks like a very useful addition.

Hi, did this simply stall? Looks like a very useful addition.

Yes, this change stalled, and I haven't had time to implement/update it myself.


added Telegram ioBroker Adapter Development Starters card #67

I have added a new Telegram Card for the ioBroker Adapter Development Starters Telegram and changed the title Issue #67

LGTM. Thank you very much for your first PR to this repo!


An own item category in creative tab

https://github.com/qouteall/ImmersivePortalsMod/issues/929#issuecomment-997573397


[bug] conflict about status controller and preUpdate

Describe the problem
In preUpdate funtion if err = leaderRunner.RunQuery("SET GLOBAL super_read_only=on;");  it will change readonly when update, but Status controller will check it preriodic，if found it is readonly , reset it to read write again.
Thus, the operations has confict, so status controller need stop reset it to read write mode  when the cluster is updating

To Reproduce

Expected behavior
two node updating, stop status controller reset read write mode

Environment:

RadonDB MySQL version:

The solutions as follow

Use status variable Updating
Create file ,check file
Use lock


Possible to use the module from content_by_lua_file

I am using currently using content_by_lua_file, so I was thinking if I can use the module from the lua script itself?

@nbhatti Sure. You can use the ngx.location.capture to initiate nginx subrequest to a (internal) location configured by ngx_postgres. AFAIK, qunar.com has been using this approach in production for years already :)

@agentzh Do you have an example? I want to manage db connection and everything inside the Lua script and not in nginx directives. Currently I am just passing everything to content_by_lua_file and initiate the db connection and complete the script. Is that aso doable with ngx.location.capture?

@nbhatti Then you should not use ngx_postgres in the first place. There're some pure Lua PostgreSQL client libraries based on ngx_lua's nonblocking cosocket API, for example,

https://github.com/azurewang/lua-resty-postgres
https://github.com/leafo/pgmoon

They're much more flexible than doing subrequests + ngx_postgres.


Everlong

Goal
Develop an instrument to manage the lifecycle of many long purchases+redemptions while offering users a single entrypoint (4626-compliant vault) to gain exposure.
Deposit receipts from this instrument are intended for use as collateral in external systems to enable leveraging.
Tasks

[x] https://github.com/delvtech/hyperdrive/issues/1082
[x] https://github.com/delvtech/hyperdrive/issues/1083
[x] https://github.com/delvtech/hyperdrive/issues/1086
[x] https://github.com/delvtech/hyperdrive/issues/1087
[x] https://github.com/delvtech/hyperdrive/issues/1088
[ ] https://github.com/delvtech/hyperdrive/issues/1089
[ ] https://github.com/delvtech/hyperdrive/issues/1090
[ ] https://github.com/delvtech/hyperdrive/issues/1140

Update 09/04/2024
Vault share price mechanism works for fee-less Hyperdrive instances!
Currently integrating more advanced estimations for openLong and closeLong output to support Hyperdrive instances with fees.

items still left:

Portfolio valuation

Test updates

Idle liquidity consideration

Invariant testing

Yearn vault adherence

Hyperdrive read lib

Support base + shares depending on instance

Rebalancing rules

Gas Optimizations

Store poolconfig and check against cache.


Update dependencies

This guide was written a couple of years ago at this point and a few of the dependencies (more specifically the PHP dependencies) are quite out of date now. When possible, we should update these dependencies and go back through the guide and various solution branches to make sure it's still a solid set of lessons.

We might want to even consider updating the tests, in the case of PHP, to have both PEST and PHPUnit variants 🤔.


GEODE-7237: Use invalid host name in ConnectCommandAcceptanceTest

The test invalidHostname continues to fail intermittently. In the
failure, something fails to throw UnknownHostException. Having
spaces in the "invalid host name" should guarantee that it always
throws UnknownHostException now.
Also, remove the double negative from the assumeTrue by flipping it
to assumeFalse. Move the comment into the assumeFalse as a message.
Please review: @aaronlindsey

Timeout exceeded on DistributedTestOpenJDK11.

UpgradeTestOpenJDK11 failed in WANRollingUpgradeSecondaryEventsNotReprocessedAfterOldSiteMemberFailover with BindException. This is unrelated to the PR.


Is it possible to login in google chrome account?

Hello.
I need to login in google chrome account like in a headful chrome. It is helpful to bypass captcha just in one click.

You can perform the form submission, but evading captchas is the challenging bit. If it were easy to programmatically solve a captcha, they wouldn't work very well as a security feature :)
See:
https://github.com/GoogleChrome/puppeteer/issues/473
https://github.com/GoogleChrome/puppeteer/issues/1935


Enable --server-dry-run with kubectl on k8s >= 1.12

kubectl supports the --dry-run for CRD in Kubernetes versions >= 1.12. This allows users to pre-validate their configuration with kubectl apply without it being persisted. To enable this feature for Istio CRD we need to set sideEffects=None in the validatingwebhookconfiguration (see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.12/#webhook-v1beta1-admissionregistration-k8s-io). We also need to verify that this can be safely set for k8s <= 1.12.
xref: https://github.com/istio/istio/issues/10429

I tried this interactively using K8s 1.13 client and server.  I set sideEffects=None with kubectl edit validatingwebhookconfigurations istio-galley and sent bogus DestinationRules.  I was not able to get the desired experience.
cat <<EOF | kubectl apply --dry-run=true -f -
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: destination-rule-httpbin
spec:
  host: httpbin
  subsets:
  - name: '*'
    labels:
      version: v1
EOF

was accepted, even though without --dry-run= it was rejected because of the subset name.
If I run without --dry-run and use -v 999 to check the traffic between the CLI and API server, the CLI attempts a PATCH and gets a 500 error
... curl -k -v -XPATCH  -H "Content-Type: application/merge-patch+json" -H "Accept: application/json" -H "User-Agent: kubectl/v1.13.4 (darwin/amd64) kubernetes/c27b913" 'https://c2.us-south.containers.cloud.ibm.com:25968/apis/networking.istio.io/v1alpha3/namespaces/default/destinationrules/destination-rule-httpbin'
... PATCH https://c2.us-south.containers.cloud.ibm.com:25968/apis/networking.istio.io/v1alpha3/namespaces/default/destinationrules/destination-rule-httpbin 500 Internal Server Error in 115 milliseconds

The XPATCH is not sent when --dry-run=true.
I am looking into why the 500 was returned instead of a normal code.

Verified that https://github.com/kubernetes/kubernetes/issues/70506 shows 500 is the default.  We can set the response to 403 like this:
func toAdmissionResponse(err error) *admissionv1beta1.AdmissionResponse {
	return &admissionv1beta1.AdmissionResponse{Result: &v1.Status{Message: err.Error(),
	Code: 403}}
}

Not sure if this is worth a PR.

OK, it works in K8s 1.13.  The key is that the user must supply kubectl apply --server-dry-run=true.  Regular --dry-run does not actually PATCH so the APIServer does not have a chance to invoke the webhook.
On K8s 1.12 there was no problem setting sideEffects: NONE but attempt to use --server-dry-run=true yielded "Error from server (BadRequest): error when creating "STDIN": the dryRun alpha feature is disabled".
I have not yet tested on <1.12.

Verified on a Kubernetes 1.11 cluster that it is OK to add sideEffects: None to the install yaml.  It is ignored upon apply.  (It can't be added by using kubectl edit).
@ayj I'd like to make a PR for this.  Should I target master or 1.1?

1.1 is pretty much done at this point. Not sure if this meets the bar for 1.1.x.
I think the best place to get this in is master.

+1 for master.


Increase torb turret health from 225 to 250

Created by: dubspool
Change max turret health from 225 -> 250

Created by: MaxwellJung
I know how to fix this I think, so let me work on this feature.

moved from ow1_emulator_backup#603

mentioned in merge request ow1_emulator_backup!276


Ping, nmdcs: XML-Line does not return the redirect information

Related to https://github.com/direct-connect/go-dcpp/issues/89
 ./dcping ping dchub://piter.feardc.net:411
{"name":"White Nights of St. Petersburg","addr":["dchub://piter.feardc.net:411"],"soft":{"name":"Verlihub","vers":"<IP_ADDRESS>","ext":["NoHello","NoGetINFO","TLS","UserIP2","TTHSearch","ZPipe","HubINFO","BotList","MCTo","FailOver","HubTopic","OpPlus","NickRule","SearchRule","UserCommand"]},"users":0,"redirect":"nmdcs://piter.feardc.net:411"}

./dcping ping dchub://piter.feardc.net:411 --out=xml-line
<Hub Name="White Nights of St. Petersburg" Address="dchub://piter.feardc.net:411" Software="Verlihub" Status="Online"></Hub>

That I expect:
Solution 1:
./dcping ping dchub://piter.feardc.net:411 --out=xml-line
<Hub Name="White Nights of St. Petersburg" Address="nmdcs://piter.feardc.net:411" Failover="dchub://piter.feardc.net:411" Software="Verlihub" Status="Online"></Hub>

Solution 2:
./dcping ping dchub://piter.feardc.net:411 --out=xml-line
<Hub Name="White Nights of St. Petersburg" Failover="nmdcs://piter.feardc.net:411" Address="dchub://piter.feardc.net:411" Software="Verlihub" Status="Online"></Hub>

Solution 3:
./dcping ping dchub://piter.feardc.net:411 --out=xml-line
<Hub Name="White Nights of St. Petersburg" Redirect="nmdcs://piter.feardc.net:411" Address="dchub://piter.feardc.net:411" Software="Verlihub" Status="Online"></Hub>

The best solution for my case will be Solution 1


Feature/metadata for code modules

Added env variable for oneagent to know clusterId and version
Currently One Agent Version can not be evaluated as the dynakube object does not have a oneagent object if in app-only mode. Should the object be created in the future, the version will be included in the env variable.
Already tested feature in own test cluster.

Removed the OneAgent version from the metadata, also setting the static fields, Operator, and the Operator version, directly rather than having them configurable (since nothing needs it at the moment.)


1.4 beta doesn't use monospace digits in the default font anymore

I'm relying on monospaced digits (meaning that all digits have the same width) in my custom stocks plugin. This is typical a font feature.
1.3.1 and 1.4beta use exactly the same font on OS X 10.11.1 El Capitan (the San Francisco system font), but while 1.3.1 uses monospaced digits, 1.4beta doesn't anymore. See screenshots:
1.3.1:

1.4beta:

I think monospaced digits are always preferable for BitBar use cases.
This may help to resolve it:

Thread in Apple Developer Forums
Threat at StackOverflow

Thanks for the report. I might be mad, but I can't see a difference between those two images. If you have some time, it would be great if you could solve this problem since you seem to understand it so well? If not, leave it and we'll get around to it.

Look at the "1" in "-1,31%" and compare it to the "0" from "-0,69%" (in the line below). They have different widths in the second screenshot, but not in the first.
I'll have a look at the code but am not experienced with Xcode.

I think we need this: http://stackoverflow.com/a/33983421 somewhere here: https://github.com/matryer/bitbar/blob/master/App/BitBar/Plugin.m#L60

OK leave it with us - thanks

On 6 Jan 2016, at 17:54, Thomas Bachem<EMAIL_ADDRESS>wrote:
I think we need this: http://stackoverflow.com/a/33983421 http://stackoverflow.com/a/33983421 somewhere here: https://github.com/matryer/bitbar/blob/master/App/BitBar/Plugin.m#L60 https://github.com/matryer/bitbar/blob/master/App/BitBar/Plugin.m#L60
—
Reply to this email directly or view it on GitHub https://github.com/matryer/bitbar/issues/123#issuecomment-169403189.

Over in #137 there is some discussion about being able to change colour inline. This could be somewhat of a duplicate - because I think some text would benefit from proportional over monospaced, and obviously vice-versa.
In #137 the two emerging solutions are either XML or ANSI Escape codes. Both would support changing the fonts. ANSI Codes support up to 9 alternative fonts. An example of how to render them:
MONOSPACE='\033[0;19m' # this is just an example, `19m` can be `11m` to `19m`
RESET='\033[0m'
echo -e "This is normal font.... ${MONOSPACE}This is monospace font${RESET}"

Also, obviously, the same could be done for XML/HTML:
This is normal font.... This is monospace font

<entry>This is normal font.... This is monospace font</entry>

@keithamus Thanks, but please note that I'm just talking about monospaced DIGITS in a proportional font, not a monospaced font. I think monospaced digits are always preferable.

Was quite easy to implement even for an Objective C newbie, see pull request #148 :)


I am sure this is correct but it just does not want to accept it!

Challenge Name

Issue Description

Browser Information

Browser Name, Version:
Operating System:
Mobile, Desktop, or Tablet:

Your Code

Screenshot

@ArmanRohanishad Thank you for reporting this issue.
This is a standard message notifying you that this issue seems to be a request for help. Instead of asking for help here, please click the "help" button on the challenge on Free Code Camp, which will take you to the help chatroom for that specific challenge. You can also view our full list of official chatrooms.
If you think I'm wrong in closing this issue, please reopen it and add further clarification. Thank you, and happy coding!