Add tweet attributes about links, reply, media

Thank you for your great scraping library!! I'm a heavy user of twitterscraper!
I always use a modified version of your library in my local env, so offer its useful functions.
Modification
I did the following 3:

add new tweet attributes about links, media and reply
delete some RT attributes because these doesn't work
refactoring for readability

New tweet attributes
Some un-used infomation of tweets about links, media and reply is extracted, added to Tweet's(in twitterscraper/tweet.py) attributes.
New attributes are about:

links

Tweet.links: links(URLs) list
Tweet.hashtags: hashtags list

media

Tweet.img_urls: images url list
Tweet.video_url: video url(each tweet includes at most 1 video url)
Tweet.is_media: if a tweet includes media(images, video), or not

reply - mainly infomation about to whom user reply

Tweet.parent_tweet_id: which tweets(tweet id) did user reply to
Tweet.reply_to_users: which users did user reply to

list of dict {'screen_name': screen_name, 'user_id': user_id}

Tweet.is_reply_to: if a tweet is replying to others, or not

Delete some RT attributes
I deleted some RT attributes:

Tweet.retweet_id
Tweet.retweeter_username
Tweet.retweet_userid

These were extracted from tweet_div in Tweet.from_soup(), however, tweet_div HTML attributes "data-retweet-id", "data-retweeter", a tag's "pretty-link js-user-profile-link" didn't work well. Therefore, these attributes should be deleted.
Refactoring for readability
This part is no big deal but important.
The Part of passing arguments to Tweet constructor's(around __init__ of Tweet) is low readability and difficult to modify this. Therefore, I divided these arguments by content types by commenting out.
End heading
I think my modifications is very useful at least in my local env, so surely useful for twitterscraper!!
I really appreciate your effort. Hopefully I can be of any help to you.

@nukopy Thank you for this useful addition!
I think it partly overlaps with some features which are added by https://github.com/taspinar/twitterscraper/pull/210 .
I plan to merge that PR since it was submitted earlier. So can you remove code related to "Tweet.img_urls" and "Tweet.is_media" attributes (if you also agree it is the same)?
Plus also here, don't you want to write the retrieved information to the output file?

I think it partly overlaps with some features which are added by #210 .
I plan to merge that PR since it was submitted earlier. So can you remove code related to
"Tweet.img_urls" and "Tweet.is_media" attributes (if you also agree it is the same)?

I've just seen PR #210. It's almost the same as mine but DIFFERS from whether BeautifulSoup object(bs4 object) for only images is defined.
I added it would make debugging easier though it increases memory usage.
What do you think about that?

Plus also here, don't you want to write the retrieved information to the output file?

Sorry, I forgot it! I'll write soon.
I'd like to ask you for confirmation, do you agree my refactoring(added comments)?
I don't have confidence because I have little experiece for refactoring.
Sorry for messing up git's diff.

This PR is awesome! As a user of twitterscraper I prefer this PR to #210 because it adds more features (e.g. the information about replies). Some of the added features (like the hashtags list) I am already calculating myself. So if this PR is merged I would have to do less processing myself, which is always good.
@nukopy If you want I can review your code.

@taspinar I wrote the retrieved information to the output CSV file and modified slightly.
Modification is simple:

use Python set instead of list for Tweet attributes: hashtags, links to avoid duplication of them.

Please, make sure.
@twollnik I'm glad to hear your opinion. I would appreciate it if you review my code!

This PR keeps getting better still :)
Good comments by @twollnik

I think I will merge this PR for now and release a new version 1.4.0 of twitterscraper.
good work guys1


Add basic search functionality

It's pretty scuffed as its been a while since I worked with React.
I added the react-router-dom for the BrowserRouter so I could use useSearchParams and useNavigate.
I'd like to move more of the state to the url, this is great as it allows you to share your search queries and what snippet you have open. However, that would be a major refactor, so I'll leave the idea here.
It's been like a year but WDS had a video on it and I Theo as well. I think, I didn't re-watch to check.

I don't have much experience with react so my architecture and code is likely not so clean.

I agree that moving the state to the URL should be something we work on, as it also allows to go back and forth in your history of visited pages

As you said you aren't really familiar with react router and all, if you want I can contribute to this PR improving the way it's used and handled

As you said you aren't really familiar with react router and all, if you want I can contribute to this PR improving the way it's used and handled

I'd really appreciate that! I could figure it out, but learning React Router while working on a public repo sounds like more effort than I want to put in right now.

you guys forget to change this thing

Oh and there is a weird flicker when you go from the search page to the hompage...
I think one way to make this easier would be to remove the separation between the search and hompage...
At least from the path, and only keep it as a query param, like if ?q=thing is present then we search, else we dont.

Oh and there is a weird flicker when you go from the search page to the hompage...
I think one way to make this easier would be to remove the separation between the search and hompage...
At least from the path, and only keep it as a query param, like if ?q=thing is present then we search, else we dont.

I originally intended to make a different design, in my latest commit message I also conclude the same as you.


Logs being flooded with heartbeat drift warnings for Hue and Weather plugins

Issue

The homebridge logs are being flooded with a lot of heartbeat drift messages, see log snippet below
Note that I recently updated my newest Philips Hue bridge on 15.04.2021 to SW<PHONE_NUMBER>, I am unsure if this is relevant.
  This could indicate an overloaded system, or an ill-behaving plugin blocking the NodeJS main thread (typically by doing synchronous I/O).

Thanks, good to know. I'll disable my plugins one by one and report the culprit here

Hi @ebaauw
I isolated the overload to the homebridge-cmd4 v3.5.1 plugin.
I'll advise the developer of this plugin.


bug in pre-release

Somehow pip tried to install the pre-release just now on my pc instead of grabbing a stable release. Not sure whether that's intentional but I get the following error when doing so:
Searching for MarkupSafe>=1.1
Reading https://pypi.org/simple/MarkupSafe/
Downloading https://files.pythonhosted.org/packages/e0/bf/acc45baeb2d7333ed724c30af188640d9cb0be4b28533edfc3e2ae5aad72/MarkupSafe-2.0.0a1.tar.gz#sha256=beac28ed60c8e838301226a7a85841d0af2068eba2dcb1a58c2d32d6c05e440e
Best match: MarkupSafe 2.0.0a1
Processing MarkupSafe-2.0.0a1.tar.gz
Writing /tmp/easy_install-hkxttng2/MarkupSafe-2.0.0a1/setup.cfg
Running MarkupSafe-2.0.0a1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-hkxttng2/MarkupSafe-2.0.0a1/egg-dist-tmp-s5xf4p4g
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-hkxttng2/MarkupSafe-2.0.0a1/setup.py", line 56, in <module>
    'buildingspy/thirdParty.dymat',
  File "/tmp/easy_install-hkxttng2/MarkupSafe-2.0.0a1/setup.py", line 43, in run_setup
    'simplejson',
  File "/usr/local/lib/python3.5/dist-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.5/distutils/core.py", line 121, in setup
    dist.parse_config_files()
  File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 690, in parse_config_files
    ignore_option_errors=ignore_option_errors)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 121, in parse_configuration
    meta.parse()
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 426, in parse
    section_parser_method(section_options)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 399, in parse_section
    self[name] = value
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 184, in __setitem__
    value = parser(value)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 515, in _parse_version
    version = self._parse_attr(value, self.package_dir)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 349, in _parse_attr
    module = import_module(module_name)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 669, in exec_module
  File "<frozen importlib._bootstrap_external>", line 775, in get_code
  File "<frozen importlib._bootstrap_external>", line 735, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/tmp/easy_install-hkxttng2/MarkupSafe-2.0.0a1/src/markupsafe/__init__.py", line 83
    return f"{self.__class__.__name__}({super().__repr__()})"
                                                            ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 74, in <module>
    "Topic :: Utilities",
  File "/usr/local/lib/python3.5/dist-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python3.5/dist-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/usr/local/lib/python3.5/dist-packages/setuptools/command/install.py", line 117, in do_egg_install
    cmd.run(show_deprecation=False)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 425, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 674, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 721, in install_item
    self.process_distribution(spec, dist, deps)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 766, in process_distribution
    [requirement], self.local_index, self.easy_install
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 783, in resolve
    replace_conflicting=replace_conflicting
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1066, in best_match
    return self.obtain(req, installer)
  File "/usr/local/lib/python3.5/dist-packages/pkg_resources/__init__.py", line 1078, in obtain
    return installer(requirement)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 693, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 719, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 904, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1172, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/command/easy_install.py", line 1158, in run_setup
    run_setup(setup_script, args)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 253, in run_setup
    raise
  File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python3.5/contextlib.py", line 77, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/_vendor/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-hkxttng2/MarkupSafe-2.0.0a1/setup.py", line 56, in <module>
    'buildingspy/thirdParty.dymat',
  File "/tmp/easy_install-hkxttng2/MarkupSafe-2.0.0a1/setup.py", line 43, in run_setup
    'simplejson',
  File "/usr/local/lib/python3.5/dist-packages/setuptools/__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.5/distutils/core.py", line 121, in setup
    dist.parse_config_files()
  File "/usr/local/lib/python3.5/dist-packages/setuptools/dist.py", line 690, in parse_config_files
    ignore_option_errors=ignore_option_errors)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 121, in parse_configuration
    meta.parse()
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 426, in parse
    section_parser_method(section_options)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 399, in parse_section
    self[name] = value
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 184, in __setitem__
    value = parser(value)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 515, in _parse_version
    version = self._parse_attr(value, self.package_dir)
  File "/usr/local/lib/python3.5/dist-packages/setuptools/config.py", line 349, in _parse_attr
    module = import_module(module_name)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 669, in exec_module
  File "<frozen importlib._bootstrap_external>", line 775, in get_code
  File "<frozen importlib._bootstrap_external>", line 735, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/tmp/easy_install-hkxttng2/MarkupSafe-2.0.0a1/src/markupsafe/__init__.py", line 83
    return f"{self.__class__.__name__}({super().__repr__()})"
                                                            ^
SyntaxError: invalid syntax

that's using python 3.5

Python 3.5 is not supported. python_requires is set appropriately, so whatever pip you're using is too old.

@davidism okay, thanks for the feedback :)


Create Sequence Crafting

When a Create Sequence has more than a single run, it calculatetes only 1 times all needed Items, but in this exaple it needs 5 runs, that means it needs 1 Golden Plate and 5 small cogwheels 5 Large Cogwheels and 5 Iron Nuggets.

Create exposes what you see in the recipe tree. For it to be correct, create would need to add first party EMI integration.


compile is obsolete, use implementation now

you need to use "implementation" instead of "compile" while adding the dependency in your build.gradle

@Akramhussain4 yes. The instructions state to use compile. Pull Request https://github.com/pilgr/Paper/pull/141 fixes this in the instructions.

#141 closes this.


A few typo fixes in the uTVM design doc.

A few small typo fixes in the uTVM design doc.

@areusch Quick PR for you.

@areusch Quick PR for you.


[Observer] Defend against nullptr and exceptions related to suspend/resume

Call Blinker.startNotification() and stopNotificaiton more often (in SessionManager) to make LED state more up-to-date following system suspend and resume.
Check null value in _gazeDevice before passing its value to a Metadata proto. Previously this has caused crashe when _gazeDevice is null.
When _gazeDevice is null in Upload, return early instead of throwing an assertion error.
Defend against Win32Exception raised by CopyFromScreen() that happens occasionally in ScreenCapture

Tested this on my own Surface Pro, the user's machine and a duplicate device and found no issue. Merging PR now.
cc @joncamp @TeamGleasonDev

Let me know if you have any comments and I will be happy to address them in follow up PRs.


Set update record's response type to None

authress_client.records.update_record successfully calls PUT request to update access records but raises a ValueError before returning. ValueError is raised because the function is trying to convert the response into an Access Record but PUT doesn't return a response body. Changing the response type to None fixes this issue.

Awesome, thanks. As soon as the release branch is rebuilt this changed will be pushed out.


kafka sink take more than one second to send out message

Environment:  debian

eKuiper version (e.g. 1.3.0):   lfedge/ekuiper:1.10.0-alpha.0
Hardware configuration (e.g. lscpu):
OS (e.g. cat /etc/os-release): linux
Others:

What happened and what you expected to happen:
What happened:
kafka sink take more than one second to send out message
Another minor problem, when delivering message fails, if the error is recoverable, we should return error message starts with IOError, so that the sink cache can take effect. Check #1767 as an example.
What you expected to happen:
kafka sink should take less than 100 ms to send out message
How to reproduce it (as minimally and precisely as possible):
use kafka sink to send data into kafka broker
check the metrics for rule

Anything else we need to know?:

@carlclone Do you have any ideas about this problem? Is it related to server or client configuration?

if the topic does not exist , it might be slow at the first time due to topic creation and partition info retrieve
another possibility is the RequiredAcks param , now is set to wait all ack .
//  RequireNone (0)  fire-and-forget, do not wait for acknowledgements from the
//  RequireOne  (1)  wait for the leader to acknowledge the writes
//  RequireAll  (-1) wait for the full ISR to acknowledge the writes
i will give it a test .

the problem comes from the kafka-go package , by default it wait for 1 second batch for sending batch message
https://github.com/segmentio/kafka-go/issues/326
setting this config can solve the problem:
BatchTimeout:           1 * time.Nanosecond,
=== RUN   TestKafkaSink
time consuming 21 ms
time consuming 9 ms
time consuming 4 ms
--- PASS: TestKafkaSink (0.04s)

This makes sense, thank you.


Verification error when verifying fully specified correct program

Verifying the attached program results in the following error:
[error] Exception in thread "main" gvc.VerificationException: Loop invariant acc(maxSeg(list, y, max), write) && acc(acyclic(y), write) might not hold on entry.
There might be insufficient permission to access maxSeg(list, y, max). (<no position>)

The same error occurs for both versions: the .c0 file with gvc0 and the .vpr file with silicon-gv.
The program verifies correctly on Viper example page and the VSCode Viper IDE.

list_max.vpr
list_max.c0

For list_max.vpr, updating acyclic as follows:
predicate acyclic(s: Ref) {     s == null ? true : acc(s.val) && acc(s.next) &&  s != s.next && acyclic(s.next) }
fixes the issue. I think that fold maxSeg(list, y, $result) on line 55 of list_max.vpr was not working as intended as the symbolic state at that point does not have information on whether list == y. The change to acyclic predicate ensures list != y.
I think that when using https://viper.ethz.ch/examples/blank-example.html or VSCode Viper IDE, s != s.next is not needed because of some implementation difference. I'm not sure but I suspect it may be something to do with how recursive predicates or the separating conjunction && are dealt with. I am currently looking into it.
On the other hand, adding && s != s->next to acyclic predicate in list_max.c0 results in a new error:

[error] Exception in thread "main" gvc.VerificationException: Conditional statement might fail. There might be insufficient permission to access y.Node$val. ()
The following .vpr file gets generated from the updated list_max.c0:
list_max-generated.vpr.txt
Running this file through the verifier results in the following error:

[0] Conditional statement might fail. There might be insufficient permission to access y.Node$val<EMAIL_ADDRESS>
I am looking into this issue as well. There is no unfold acyclic(y) at the beginning of the while loop body in findmax() in the generated .vpr file. This might be because predicates in loop invariants before entering loops are not treated iso-recursively (mentioned in Gradual C0 paper section 4.3.7)? I'm not sure, I may be missing something.

The second issue (with list_max.c0) turned out to be more straightforward. There is a typo in line 57 // @unfold acyclic(y); should instead be //@unfold acyclic(y);. Currently, the line is being parsed as a comment.
Fixing that and adding && s != s->next to acyclic predicate should be sufficient.

Update: The root cause of the issue appears to be the same as #33 - requiring permission to a predicate to match exactly, so if a predicate has permission greater than 2 in the heap, then consuming it will always fail.
The following program is a minimal failing example:
field next: Ref

predicate acyclicSeg(s: Ref, e: Ref) {
    s == e ? true: acc(s.next) && acyclicSeg(s.next, e)
}

method minimal(list: Ref)
    requires acc(list.next)
{
    var y: Ref
    y := list.next

    fold acyclicSeg(list.next, y)
    fold acyclicSeg(list, list.next)

    assert acyclicSeg(list, y)
}

The reason why adding s != s.next to the acyclic predicate or analogously adding list != list.next to the precondition in this minimal example fixes the issue is because it forces the verifier down the successful branch.
When folding acyclicSeg(list, list.next) since the verifier does not know whether list aliases with list.next, it will branch across two execution paths for the two cases. In the case where they do not equal, it succeeds, but in the case where they equal, it fails.
It fails because because if list == list.next, then acyclicSeg(list, list.next) is the same as acyclicSeg(list.next, y), so acyclicSeg(list, y) then has permission 2 in the heap. Then, when asserting acyclicSeg(list, y), it tries to consume but fails because consuming a predicate requires that the permissions match exactly.


implement util function for retrieving selected option in the dropdownSearch

i'll have five dropdownSearch in the same view and i'm tired to create boilerplate code for retrieving the selected option in all of them. Just added a simple function write less code.

Codecov Report

Merging #567 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #567   +/-   ##
=======================================
  Coverage   99.75%   99.75%
=======================================
  Files         249      249
  Lines        6100     6100
  Branches     1393     1393
=======================================
  Hits         6085     6085
  Misses         15       15

Continue to review full report at Codecov.

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


CRD is not installed via Helm

CRD is not installed via Helm, even though it will be deployed by default  (https://github.com/kedacore/keda/blob/master/chart/keda/templates/scaledobject-crd.yaml#L1)
System information

Kubernetes on Windows Laptop (Docker for Windows)

Repro

Spin up new cluster
Run helm install kedacore/keda-edge --devel --set logLevel=debug --namespace keda --name keda
No CRD is available

Example
⚡ tkerkhove@tomkerkhove C:\keda-sample-dotnet-worker-servicebus-queue
❯ helm install kedacore/keda-edge --devel --set logLevel=debug --namespace keda --name keda
NAME:   keda
LAST DEPLOYED: Fri May 31 14:31:40 2019
NAMESPACE: keda
STATUS: DEPLOYED

RESOURCES:
==> v1/Service
NAME            TYPE       CLUSTER-IP   EXTERNAL-IP  PORT(S)         AGE
keda-keda-edge  ClusterIP  <IP_ADDRESS>  <none>       443/TCP,80/TCP  0s

==> v1/Deployment
NAME            DESIRED  CURRENT  UP-TO-DATE  AVAILABLE  AGE
keda-keda-edge  1        1        1           0          0s

==> v1beta1/APIService
NAME                             AGE
v1beta1.custom.metrics.k8s.io    0s
v1beta1.external.metrics.k8s.io  0s

==> v1/Pod(related)
NAME                            READY  STATUS             RESTARTS  AGE
keda-keda-edge-ddfc79588-vwmwm  0/1    ContainerCreating  0         0s

==> v1/ServiceAccount
NAME                 SECRETS  AGE
keda-serviceaccount  1        0s

==> v1/ClusterRoleBinding
NAME                           AGE
keda-keda-edge                 0s
hpa-controller-custom-metrics  0s

When getting all CRDs none are installed:
⚡ tkerkhove@tomkerkhove C:\keda-sample-dotnet-worker-servicebus-queue
❯ kubectl get customresourcedefinition --all-namespaces
No resources found.

Hm that's odd, it works when connecting to AKS cluster.

There is something going on but can't put my finger on it.
What I've noticed on the AKS cluster is when I remove the installed chart, the CRD is not removed.
Here is the full log:
⚡ tkerkhove@tomkerkhove C:\keda-sample-dotnet-worker-servicebus-queue
❯ kubectl get customresourcedefinition
No resources found.

⚡ tkerkhove@tomkerkhove C:\keda-sample-dotnet-worker-servicebus-queue
❯ helm install kedacore/keda-edge --devel --set logLevel=debug --namespace keda --name keda
NAME:   keda
LAST DEPLOYED: Fri May 31 16:27:22 2019
NAMESPACE: keda
STATUS: DEPLOYED

RESOURCES:
==> v1/ClusterRoleBinding
NAME                           AGE
hpa-controller-custom-metrics  1s
keda-keda-edge                 1s

==> v1/Deployment
NAME            READY  UP-TO-DATE  AVAILABLE  AGE
keda-keda-edge  0/1    1           0          0s

==> v1/Pod(related)
NAME                             READY  STATUS             RESTARTS  AGE
keda-keda-edge-584dd6ccc6-b97z4  0/1    ContainerCreating  0         0s

==> v1/Service
NAME            TYPE       CLUSTER-IP    EXTERNAL-IP  PORT(S)         AGE
keda-keda-edge  ClusterIP  <IP_ADDRESS>  <none>       443/TCP,80/TCP  0s

==> v1/ServiceAccount
NAME                 SECRETS  AGE
keda-serviceaccount  1        1s

==> v1beta1/APIService
NAME                             AGE
v1beta1.custom.metrics.k8s.io    0s
v1beta1.external.metrics.k8s.io  0s

⚡ tkerkhove@tomkerkhove C:\keda-sample-dotnet-worker-servicebus-queue
❯ kubectl get customresourcedefinition
NAME                        AGE
scaledobjects.keda.k8s.io   0s

⚡ tkerkhove@tomkerkhove C:\keda-sample-dotnet-worker-servicebus-queue
❯ helm delete --purge keda
release "keda" deleted

⚡ tkerkhove@tomkerkhove C:\keda-sample-dotnet-worker-servicebus-queue
❯ kubectl get customresourcedefinition
NAME                        AGE
scaledobjects.keda.k8s.io   5s

helm has some odd behavior around CRDs (see https://github.com/helm/helm/issues/4440)
@lee0c also did some investigations here https://github.com/kedacore/keda/pull/107

Not sure about the first issue, but I can speak to the second:
Helm uses a specific crd-install hook for CRDs as mentioned in the linked issue, and it won't delete the CRD by default. There is a value in the helm chart for keda (customResourceDefinition.create) that allows you to bypass the CRD install so you don't need to manually delete when reinstalling - and this also allows you to keep your scaledobjects between installations.
My guess for the first issue is that potentially the crd-install hook isn't properly supported on the first system you tried? But that's a wild guess, so no guarantees.

That wild guess is probably true.
So given it's how helm works I'm closing the issue, feel free to reopen if needed.


⚠ Bofrost.de has degraded performance

In 52b08cc, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 981 ms

Resolved: Bofrost.de performance has improved in fab8c4f after 31 minutes.


Support application testing defined in the devfile v2

/kind user-story
User Story
As a user, I want to test my application using the test defined in a devfile.  Devfile 2.0 supports defining commands belongs to the test group (https://github.com/devfile/kubernetes-api/issues/27). The test command will be used for running automated testing on the application.
Acceptance Criteria

[ ] odo test will run test command (command belongs to the test group) specified in the command that belongs to the group test defined in the devfile
[ ] odo uses this logic to decide which test command to run on odo test:

if only one test command is define, use that command regardless of whether that command with isDefault is set to true or not.
if more than one test command, execute the one with isDefault set to true
-odo test --test-command <command name> will execute the command with the given command name regardless of a default test command is defined or not.
if more than one test command but no default is defined, error out if --test-command is not use.

Links
/kind user-story
/area devfile

blocked by: https://github.com/openshift/odo/pull/3291
requires the code for command group validation to be merged

ping @girishramnani @kadel @dharmit should we discuss this a bit more before we merge the PR?

ping @girishramnani @kadel @dharmit should we discuss this a bit more before we merge the PR?

@cdrage is there anything specific that you want to discuss?

@kadel Nope, just wanted to make sure that there is a clear consensus on getting this merged in since I didn't see any discussion.
But I think this command is great in order to test the commands

/remove-triage needs-information


Regex fix

Hi, I had some issues with the constant generator when I used it for my map so I thought I'd fix them.

Regex didn't properly escape characters if there were multiple in one name/suffix combination.
The foreach loop would edit the string but it seems like it found patterns to edit based on the first time it read the string, but then not find patterns based on the updated string. So if you have an ability called (Priestess of the Moon) (T) Starfall it would turn it into ABILITY__PRIESTESS_OF_THE_MOON)__T)_STARFALL which isn't an acceptable c# variable name.
The Parser didn't properly catch suffixes from unit objects. It was looking for (Editor Suffix) but the suffix for units is called (Name - Editor Suffix) so it wasn't caught by the parser.
The constant generator didn't check for duplicate names in the generated variables. I've prevented duplicates by adding the code to the generated constants (and escaping those as well because codes can have special characters)
Buffs in the game usually have their names in the tooltip field, the name field is editor only and used for buff objects that don't show up in-game. For example Shockwave (Caster), and Earthquake (Caster). It now checks for the tooltip field and sets the buff objects name to that.

I also edited some other things but those might be personal preference:

Added a regex pattern to replace underscores with a single underscore if there is more than 1 in a row. (___ becomes _)
Renamed UNIT_TYPE to UNIT for consistency, since the other types don't have _TYPE appended to them. It also makes the generated constant slightly shorter.

Sorry for the slow response, not really used to checking repositories for this kinda stuff yet.
I've merged the changes and updated the package now.
I'm not 100% sure if I like the change for the duplicate change though, because it means that it is not obvious to the user that something is wrong. Perhaps I'll try and address that issue in a more elegant way than generating an invalid file though.

Sorry for the slow response, not really used to checking repositories for this kinda stuff yet.
I've merged the changes and updated the package now.
I'm not 100% sure if I like the change for the duplicate change though, because it means that it is not obvious to the user that something is wrong. Perhaps I'll try and address that issue in a more elegant way than generating an invalid file though.

Thanks for merging it! I wasn't sure about it either, but it seemed like the simplest solution to me. Instead of adding the ability code you could append an increasing number to the end of the generated constant if there's already a constant with that name.  so you get ABILITY_STORM_BOLT_1, ABILITY_STORM_BOLT_2, etc.

Thanks for merging it! I wasn't sure about it either, but it seemed like the simplest solution to me. Instead of adding the ability code you could append an increasing number to the end of the generated constant if there's already a constant with that name.  so you get ABILITY_STORM_BOLT_1, ABILITY_STORM_BOLT_2, etc.

Could perhaps make it an option on how to handle it, but I'd definitely say the preferred option would be for the user to ensure that there are no duplicate names. I can't remember if it already includes the editor suffix, but if not then that'd be a good way to allow the user to differentiate without having to actually change the name of things.
Doing something like appending _1 doesn't really help, since figuring out which one is _1 and which one is _2 would require you to either convert the FourCC yourself and find out, or just trial and error on the map. I'll see about a solution this weekend.

Could perhaps make it an option on how to handle it, but I'd definitely say the preferred option would be for the user to ensure that there are no duplicate names. I can't remember if it already includes the editor suffix, but if not then that'd be a good way to allow the user to differentiate without having to actually change the name of things.
Doing something like appending _1 doesn't really help, since figuring out which one is _1 and which one is _2 would require you to either convert the FourCC yourself and find out, or just trial and error on the map. I'll see about a solution this weekend.


Update release documentation for stable branches

Now that the automated release process can create the stable brnaches,
update the documentation accordingly.
Depends on: https://github.com/submariner-io/releases/pull/85
Signed-off-by: Mike Kolesnik<EMAIL_ADDRESS>

@mkolesnik check the comments ^

@mkolesnik can you please address the review comments?


Update the repo to support VS2019 and to use C# 8.0

CC. @jkotas

Looks like jobs are failing with Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Failure looks to be because the BuildTools update also updated xunit.console, which depends on System.Runtime, Version=<IP_ADDRESS>

Looks like RunTests.cmd changed from:
call %RUNTIME_PATH%\dotnet.exe xunit.console.dll ILCompiler.Compiler.Tests.dll  -xml testResults.xml -notrait category=nontests -notrait category=nonwindowstests  -notrait category=OuterLoop -notrait category=failing

to:
call xunit.console.dll ILCompiler.Compiler.Tests.dll  -xml testResults.xml -notrait category=nontests -notrait category=nonwindowstests  -notrait category=OuterLoop -notrait category=failing

CC. @ViktorHofer who made most of the relevant changes to BuildTools here: https://github.com/dotnet/buildtools/pull/2168.
What is the appropriate fix here? It looks like we are hitting: https://github.com/dotnet/buildtools/blob/master/src/Microsoft.DotNet.Build.Tasks/PackageFiles/tests.targets#L82

@tannergooding we aren't using tests.targets anymore in corefx. I don't think anyone besides coreclr is using buildtools/master. You can apply whatever fix works for you. Do you need help?

Do you need help?

No, I think a workaround should be trivial enough. Looks like this might require another update to BuildTools, however (I didn't see any hooks that would allow me to fix this just locally).

Actually, @ViktorHofer. It looks like just setting BuildingNETCoreAppVertical would do the trick. Would there be any concerns (or negative impact) from doing so?
It looks like it is only consumed from within the BuildTools tests.targets file.

Yeah I had the same discussion with @trylek some months ago who tried to use the tests.targets in corert. Yes setting BuildingNETCoreAppVertical should do it as you tell the script that you want to use the .NET Core test profile.

FWIW, this is my PR from the end of last year where I tried to enable CoreRT build under VS2019:
https://github.com/dotnet/corert/pull/6617
I however didn't manage to make it fully work before I had to switch over to other work.

No changes, just modified the timestamp on the last commit to try and retrigger the jobs. There were none actually pending in CI.

Looks like some of the projects tried to use the desktop compiler and caused the "Requires net472" dialog box to show.

The CoreCLR tests jobs are failing because tests.targets is using xunit.runner.msbuild, which is Desktop only. However, LangVersion=8 requires net472 on Desktop.

Looks like the failures are because BuildTools significantly rewrote how the test logic works (and most of it is specific to CoreFX).
I'm trying a workaround that keeps the BuildTools version the same but adds a step to our own init-tools.cmd (the one that calls the build-tools init-tools.cmd) that restores the needed Toolset Compiler versions.

I believe this should be good now as well (only the Wasm jobs are left).
It would be great if people who have already signed-off could give this a second glance, given it required a few more iterations to get correct and has a "hack" to get the toolset compiler down, rather than pulling it in via BuildTools.
If people are okay with the above approach, I will log a bug tracking removal of the workaround and actually updating the BuildTools dependency (or maybe just dealing with it in the Arcade transition).

Logged https://github.com/dotnet/corert/issues/7032 to track removal of the workaround once we can remove the desktop dependency from tests/CoreCLR/runtests/tests.targets.


User gets 404 after login

I've followed the steps described in the documentation.
Once my test user is logged in, they are redirected to the following URL, and get an 404 Error:
https://login.microsoftonline.com/b2c-tenant-name.onmicrosoft.com/oauth2/v2.0/authorize?p=b2c_1a_custompolicyname_signup_signin&client_id=XXXXXXX-b651-49e3-a15f-29433795729e&redirect_uri=https%3A%2F%2Fcustom-test-website.azurewebsites.net&response_mode=form_post&response_type=id_token&scope=openid&state=OpenIdConnect.AuthenticationProperties%3DCFE92xFTTfPNcOlQEsL1....
Any help would be greatly appreciated.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: bf203c92-3847-c2f9-f966-edaca7b59818
Version Independent ID: 76f7519d-3040-646d-93a0-2657812d81e9
Content: Set up sign-in with an Azure Active Directory account in Azure Active Directory B2C using custom policies
Content Source: articles/active-directory-b2c/active-directory-b2c-setup-aad-custom.md
Service: active-directory
Sub-service: b2c
GitHub Login: @mmacy
Microsoft Alias: marsma

@moez-slimi  Thanks for your feedback! We will investigate and update as appropriate.

@moez-slimi  Hey Moez, are you sure you properly setup your custom policy and are you sure the names are all correct?
I see the redirect URI is to : https://custom-test-website.azurewebsites.net
This is not a currently running azure app service. Please double check that your redirect URIs point to valid endpoints that are properly functioning. Closing this issue as the error is due to the redirect uri.

I apologize for the confusion: none of the urls are real, I just wanted to illustrate the issue.
I made some progress, and after enabling diagnostics I noticed that the reply URI that Azure AD is using post login is
https://login.microsoftonline.com/te/tenant-name.onmicrosoft.com/oauth2/authresp
instead of the
https://your--B2C-tenant-name.b2clogin.com/your-B2C-tenant-name.onmicrosoft.com/oauth2/authresp
mentioned in the documentation.
Also, I found out that the scope mentioned in the documentation  (openid) is not sufficient to get "usable" claims from AD. The minimum would be [openid email], ideally would include [openid profile email].
Also the default mapping mentioned in the documentation did not work for me (replaced oid with sub, and had to add email in the scope to get the email of the user).
It would be also great if the documentation explained that what the portal does behind the scene is to creating a custom policy (I went that route before using the portal, and it was more tedious/error prone).
B2C is a decent tool, especially with the pricing/ease of integration with AD/other services in azure, but the documentation is outdated/sometimes even misleading. Also, listing a number of steps to follow is not enough, there should be some explanations on what goes on behind the scenes that would help when things don't work as expected.
Thank you for your help !


Undefined property: stdClass::$ issue

Laravel Version: 5.5.*
Voyager Version: 1.0
PHP Version: 7.1
Database Driver & Version: mysql

Description:
Undefined property: stdClass::$1 /vendor/tcg/voyager/resources/views/bread/browse.blade.php)
appers after updating -> post/category -> parent category relation.
it writes correctly to the db but browse.blade.php can't load it. help needed
Steps To Reproduce:
fresh install on laravel + voyager with dummy data.
Categories BREAD.
Thanks.

Are you want display parent_id column in browse view ?

Closing due to inactivity.


Poxy >= 0.13.1 fails on Ubuntu focal

Environment
I have installed poxy in a Ubuntu 20.04 (focal) environment with pip install poxy, which currently gives 0.13.7.
Describe the bug
Executing poxy on a source tree fails with:
$ poxy
Traceback (most recent call last):
  File "/usr/local/bin/poxy", line 5, in <module>
    from poxy import main
  File "/usr/local/lib/python3.8/dist-packages/poxy/__init__.py", line 7, in <module>
    from .main import main, main_blog_post
  File "/usr/local/lib/python3.8/dist-packages/poxy/main.py", line 18, in <module>
    from .run import run
  File "/usr/local/lib/python3.8/dist-packages/poxy/run.py", line 20, in <module>
    from . import doxygen, fixers, graph, soup, xml_utils
  File "/usr/local/lib/python3.8/dist-packages/poxy/doxygen.py", line 114, in <module>
    def version() -> tuple[int, int, int]:
TypeError: 'type' object is not subscriptable

Poxy 0.13.7 runs fine on the same source tree on Ubuntu 22.04 however (with python 3.10.12).
Also, Poxy 0.13.0 works on Ubuntu 20.04 (python 3.8.10), it is just versions >= 0.13.1 that raise the above error.
Additional information
Please allow poxy to run in a Ubuntu focal environment.
In my case, I'm using a focal based Dockerfile for my CI, to build binary packages that run on several older systems.
To keep that compatibility (for AppImage builds etc), the environment cannot be updated any time soon.
--bug-report
$ poxy --bug-report
Traceback (most recent call last):
  File "/usr/local/bin/poxy", line 5, in <module>
    from poxy import main
  File "/usr/local/lib/python3.8/dist-packages/poxy/__init__.py", line 7, in <module>
    from .main import main, main_blog_post
  File "/usr/local/lib/python3.8/dist-packages/poxy/main.py", line 18, in <module>
    from .run import run
  File "/usr/local/lib/python3.8/dist-packages/poxy/run.py", line 20, in <module>
    from . import doxygen, fixers, graph, soup, xml_utils
  File "/usr/local/lib/python3.8/dist-packages/poxy/doxygen.py", line 114, in <module>
    def version() -> tuple[int, int, int]:
TypeError: 'type' object is not subscriptable

[x ] I have tried to attach the zip file generated when using the --bug-report option

Ah, looks like I've used a feature that wasn't introduced until python 3.9. Thanks for letting me know, should be a relatively easy fix.

Fixed in 0.13.8 :)


Adding missing filter fields

Closes VLANFilterSet from: #1730
What's Changed

Discussion: #1990
Added Missing fields to VLANFilterSet

description
interfaces_as_untagged
interfaces_as_tagged
vminterfaces_as_untagged
vminterfaces_as_tagged
prefixes (reverse related)

Also add has_prefixes membership filter

TODO

[ ] Explanation of Change(s)
[ ] Added change log fragment(s) (for more information see the documentation)
[ ] Attached Screenshots, Payload Example
[ ] Unit, Integration Tests
[ ] Documentation Updates (when adding/changing features)
[ ] Example Plugin Updates (when adding/changing features)
[ ] Outline Remaining Work, Constraints from Design

@glennmatthews Do you have a hint on how to fix this test?
unning docker-compose command "run --entrypoint 'nautobot-server spectacular --api-version 1.2 --validate --fail-on-warn --file /dev/null' nautobot"
PYTHON_VER=3.9
docker-compose
--project-name "nautobot2"
--project-directory "/home/admin/nautobot/development"
-f "/home/admin/nautobot/development/docker-compose.yml"
-f "/home/admin/nautobot/development/docker-compose.postgres.yml"
-f "/home/admin/nautobot/development/docker-compose.dev.yml"
-f "/home/admin/nautobot/development/docker-compose.override.yml" run
--entrypoint 'nautobot-server spectacular
--api-version 1.2
--validate
--fail-on-warn
--file /dev/null' nautobot
Creating nautobot2_nautobot_run ... done
Warning #0: VLANViewSet: VLANFilterSet: model field "ManyToManyField" has no mapping in ModelSerializer. It may be a deprecated field. Defaulting to "string"
Schema generation summary:
Warnings: 2 (1 unique)
Errors:   0 (0 unique)

I wish drf-spectacular's error messages were clearer! Some part of the changed filter is not being understood when it comes to rendering the OpenAPI/Swagger docs. I'm not 100% certain but I think you might look at the use of field_name versus to_field_name on your added filters on VLANFilterSet - I think maybe they should be changed to field_name?

The error is caused from changing the fields to recommended "all"
    class Meta:
        model = VLAN
        - fields = ["id", "vid", "name"]
        + fields = "__all__"

The error is caused from changing the fields to recommended "all"
    class Meta:
        model = VLAN
        - fields = ["id", "vid", "name"]
        + fields = "__all__"

Yeah I think we need to get that best-practice updated for the time being. Too many autogenerated filters from fields = "__all__" are not set up yet for DRF to render them properly (I think a lot of config context ones). For now you can be explicit for the fields you're looking to add.


The SmaCC grammar snippets' "simulate" button no longer works.

Normally it should spawn an inspector on the right but it no longer does.
That button does nothing (that we can see at least) on click even for well working parsers like LineParser:

Steps to reproduce the bug

Go to the LineParser class (any class will do, but it is the smallest of the default GT image)
Open the Grammar view
open any  or production snippet of that grammar
Click the lighning bolt button at the bottom of that snippet
See nothing happen

Video walkthrough
You can jump at 0:30 secs of the following video:
https://user-images.githubusercontent.com/11084784/180900535-c4d022bc-a5ad-447e-8268-313bcab5a117.mp4
I'll try to get one of the older release to reduce the search area for the regression


onDidChangeActiveTextEditor is not called when switching to a CustomTextEditorProvider

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

VS Code Version: Nightly
OS Version: Windows

Steps to Reproduce:

Attach a callback to onDidChangeActiveTextEditor
Create a new VSCode Extension with a CustomTextEditorProvider
Switch to the editor wich is created by the CustomTextEditorProvider
The callback maybe called (if a editor was active before), but the CustomTextEditorProvider is not provided in the callback

I have a own TreeView in VSCode and need to know when my editor is active, but so it does not work.

onDidChangeActiveTextEditor is only for TextEditors, not custom editors. You can use the tabs api to check when your custom editor is active

is a customTextEditor not a TextEditor?

It is not. Check the types in vscode.d.ts

Having the same issue. @mjbvz could you help link more details about tabs api here?

Any samples about listen to the active tab changes inside CustomEditorProvider?

I also asked a question here: https://github.com/microsoft/vscode-discussions/discussions/558


[C] Require C++17 (same as libarrow)

The impetus is I'd like to use things like std::optional to build some test helpers.

Hmm, fair enough. I'll scope this to the validation suite only then (I would like it in the Postgres driver too but it's not quite necessary; the validation suite is getting unwieldy though)

(and then I'll put that in the branch where I'm rewriting/expanding the validation suite in C++ because right now it's a mess of C code that I'm jettisoning)


Using different source for iOS and Android

I see in the docs, it is said that the cordova-res can be used programmatically and you can set options like this
const options: Options = {
  directory: '/path/to/project',
  resourcesDirectory: 'resources',
  logstream: process.stdout, // Any WritableStream
  platforms: {
    android: { icon: { sources: ['resources/icon.png'] } },
    ios: { splash: { sources: ['resources/splash.png'] } },
  },
};

I am wondering if cordova-res could accept the same options for the cli.
Something that goes like this: cordova-res android --icon-source='resources/android-icon.png' --splash-source='resources/android-splash.png'

Just put the different icon/splash image in resources/android and resources/ios


WW-5009 EmptyStackException in JSON plugin due to concurrency

Coverage increased (+0.003%) to 48.561% when pulling be457f4241418b75cdcf0a9b71775dde91f94163 on aleksandr-m:feature/WW-5009_master into 5d663b3193d8f2ca74217179c547b2dd36083cdb on apache:master.


When using with @ngrx/effects state is not getting updated properly

In my reducer i have update the isFetching to true on the  [class detail price] Get Centers action. But its not getting reflected.
This is happening only when i use @ngrx/effects. i.e I have a side effect once this  action is done.

how you implemented this on angular application?


feat: implement sym_hash() function for mach-o module

Implement the sym_hash() function for the mach-o module to hash all of the symbol table entries, if the binary has not been stripped. This did not include new parsing, only utiIizing the entries we already parsed

tests included

Clippy says...
error: this `.filter_map` can be written more simply using `.map`
   --> lib/src/modules/macho/mod.rs:467:35
    |
467 |       let symtab_hash_str: String = symtab_to_hash
    |  ___________________________________^
468 | |         .iter()
469 | |         .filter_map(|e| {
470 | |             Some(String::from_utf8(e.to_vec()).unwrap().trim().to_lowercase())
471 | |         })
    | |__________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_filter_map
    = note: `-D clippy::unnecessary-filter-map` implied by `-D clippy::all`
    = help: to override `-D clippy::all` add `#[allow(clippy::unnecessary_filter_map)]`

Addressed the review and comments @plusvic 😸 , thanks for the quick review!


Add new edu

Cochise College

@benshan36 I am sorry, the domain students.cochise.edu is removed from our trusted domains list because it was abused in the past. If you are the student of this school, please enroll to GitHub Student Developer Program. Then apply for JetBrains educational subscription with your GitHub account (GitHub tab at https://www.jetbrains.com/shop/eform/students).


HTML Markup Errors

The site seems to have malformed HTML-tags and markup errors.
Examples

[x] Stray <footer> tag after the body element. Occurence: global.
[ ] Incorrect hr tag: </hr>. Should be <hr>. Occurence: /q/ board.

fixed the footer: f4e72814f30f599051663e0d69f33605986cb4c8

slim (templating engine) doesn't seem to have the capability to avoid closing hr. i looked for any documentation on hr and checked the github issues however there's no mention of it.


Revisit link validation

We're using htmltest, and between Hugo and the lack of configurable options I need, it isn't working out.
This looks promising

https://crates.io/crates/hyperlink
https://github.com/lycheeverse/lychee-action

I disabled running htmltest in order to merge https://github.com/infinyon/fluvio-website/pull/532
I almost got lychee working locally, but it was tripping up on some of the internal links, and the fully qualified Hub package names (e.g<EMAIL_ADDRESS>- Leaning towards lychee bc it they maintain the GH action


Handle sometime consonant group "nc"

Closes #42.
It turns out that "nc" is only sometimes a consonant group. It is treated as a group in sequences of three or more consonants ("sanctus" -> "sanc-tus") but not when on its own ("principem" -> "prin-ci-pem")

this sounds right--I suppose basically it's nasalizing the vowel rather than acting as a true consonant, so sanctus=sãctus=sãc-tus but pri˜-ci-pem per the usual syllable division rules. Are other groups that work this way (re-demp-tor but im-pe-ra-tor?).

checking this locally,
>>> from volpiano_display_utilities.cantus_text_syllabification import syllabify_text
>>> syllabify_text("redemptor")
[SyllabifiedSection: [['re-', 'demp-', 'tor']]]
>>> syllabify_text("imperator")
[SyllabifiedSection: [['i-', 'mpe-', 'ra-', 'tor']]]

"Imperator" doesn't conform with @annamorphism's syllabification. Suggesting you address this too before merging

Is this a liquid-consonant–plus–consonant thing? Are there l<consonant> clusters that should be syllabified l-<consonant>, or similarly for r<consonant>?

redemptor vs imperator is a good catch...thanks @annamorphism and @jacobdgm for checking.

Is this a liquid-consonant–plus–consonant thing? Are there l<consonant> clusters that should be syllabified l-<consonant>, or similarly for r<consonant>?

There's nothing currently in the logic that works with liquid consonant + consonant...I'm also not immediately thinking of any examples. Do you have one?

I'm also not immediately thinking of any examples.

Ah...so liquid consonant + h I have, but in this case we already don't treat the 'h' as a consonant.

@annamorphism I'm just noticing one other previous decision I made that I don't know if I stand by...
In the following cases, do you prefer column A or column B or mixed?

Word
A
B

iusticie
iu-sti-ci-e
'ius-ti-ci-e`

fuisti
fui-sti
fuis-ti

xpistus
xpi-stus
xpis-tus

maiestatis
ma-ie-sta-tis
ma-ies-ta-tis

So column A, which creates open syllables followed by the "st" onset, is preferable to column B, which creates closed syllables instead.

Ok, thank you! That is what intuitively makes sense to me now...I'm not sure why I did it the column B way earlier. So will add to this PR a fix for that.

Fuisti should also probably be three syllables, but that's a separate issue.

The good news is that this was a typo here and that's already the way it is handled!

Yes, I was confused by your request. I thought you meant it generally, but then couldn't find anywhere else that I would want to annotate (I added it to the definition of num_ltrs_btw_vow_grps because that's the one where the best case could be made I think).
I just added another one to num_consonants...I could again see one there because it is based off of a defined variable a few lines up, although my natural inclination is that this is uneccessary.
The other two cases you mention are clearly initialized as their appropriate type, so an annotation seems superfluous.

The other two cases you mention are clearly initialized as their appropriate type, so an annotation seems superfluous.

Is the plan that Volpiano Display Utilities be fully mypy compliant? I think I had assumed that this was the plan from the beginning, in which case I don't think that any of the variables can be left unannotated.
Without reference to mypy, I think it's worth annotating all the variables, even the obvious ones, at least within a given function: If I see an unannotated variable in a context where the other variables are annotated, I'm likely to think, "oh, this isn't annotated, so the variable must have been initialized somewhere else", and then go looking for where it was defined. I can see that syl_bound is an integer at the moment it's defined, and I'm pretty confident that it wasn't initialized earlier by scrolling up and finding a docstring a few lines above, but I can't be confident that some string, say, hasn't been assigned to it somewhere later in the function.

Is the plan that Volpiano Display Utilities be fully mypy compliant? I think I had assumed that this was the plan from the beginning, in which case I don't think that any of the variables can be left unannotated.

It is currently (and was without any annotations internal to that particular function) mypy compliant.

I can't be confident that some string, say, hasn't been assigned to it somewhere later in the function.

I'm not sure I understand this. How would a type annotation ensure that a string hasn't been assigned to it later in the function? Or are you saying if there was a type annotation you would know that a string assignment later in the function (if such an assignment occurred) is wrong.

Yes, this.

Makes sense. Mypy will alert you to this without the annotation, but if you are looking at it mypy-less, I see how this is useful.

maybe having return annotations for all the functions is sufficient for a less-strict setting, whereas all variables would need to be annotated on a stricter setting.

There are definitely varying levels of strictness (I've started using --strict but haven't taken the time to check whether there are even further "strictness" levels). Again, I don't know that typing all variables would ever be necessary, but there may be some setting that does want that for some reason.


New canvas on each render

Both the Angular and the React pdf.js projects have implemented using a new canvas on each render. This PR does that as well.
From my testing, this PR fixes #73, and may also fix #59.
In my testing and from the discussion at https://github.com/mozilla/pdf.js/issues/9456, it seems the cancel() method from pdf.js is unreliable.

May also fix #52

https://github.com/mozilla/pdf.js/issues/2923 Here is the discussion where both Angular and React implemented the new canvas strategy.

The annotations feature should be tested on this. I didn't do any testing with this.

Hello @markhalonen, thanks for your contribution, I will review your code soon.
By the way, I was wondering if you took a look at the underlying PDF.js issue ?

I glanced at it, it seems the pdf.js cancel() method is not very useful without a callback. I understood how you tried to catch the exception in the render call, but I'm not sure why it wasn't working as expected. I suspect both the Angular and React people saw this same issue, and hence implemented the new canvas strategy.

@FranckFreiburger Did you have a chance to look at this?

@markhalonen sorry for the late response, I am very busy on other projects. Your PR seems good and it will be easy to revert when https://github.com/mozilla/pdf.js/issues/9456 will be fixed.


when capture image it get shifted to the left

when I try to use front camera and capture image then I get extra image section that I don't need it to be displayed.
my camera view is 200*300 dp and I get more than 200 when the load on the image the array of byte.
any help?

Facing same issue. Any solution?

put the height of the cameraview as wrap_content

nope i just used app:cameraCropOutput="true" in the XML of cameraview


Biome applies unsafe fixes inside liveshares

It seems that biome applies unsafe fixes when working in virtual workspaces, at least when working inside liveshares.
Here is a reproducible example. https://github.com/gustaferiksson/biome-unsafe
If I start a liveshare in that repo and share it with myself (in a new vscode window), and save index.ts, biome will apply the unsafe fixes.
My vscode settings has the following related to biome
  "editor.formatOnSave": true,
  "[typescript]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "editor.codeActionsOnSave": {
    "quickfix.biome": "explicit",
    "source.organizeImports.biome": "explicit"
  },
  "biome.lspBin": "./node_modules/@biomejs/biome/bin/biome",

Here is the Output from the Biome Trace that applies the unsafe fixes
[Trace - 10:55:20 AM] Sending request 'textDocument/codeAction - (24)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts"
    },
    "range": {
        "start": {
            "line": 0,
            "character": 0
        },
        "end": {
            "line": 3,
            "character": 0
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 15
                    },
                    "end": {
                        "line": 2,
                        "character": 35
                    }
                },
                "message": "Do not use template literals if interpolation and special-character handling are not needed.",
                "code": "lint/style/noUnusedTemplateLiteral",
                "codeDescription": {
                    "href": "https://biomejs.dev/linter/rules/no-unused-template-literal"
                },
                "severity": 1,
                "source": "biome"
            },
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 12
                    }
                },
                "message": "This variable is unused.",
                "code": "lint/correctness/noUnusedVariables",
                "codeDescription": {
                    "href": "https://biomejs.dev/linter/rules/no-unused-variables"
                },
                "severity": 1,
                "source": "biome"
            },
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 12
                    }
                },
                "message": "'unused' is declared but its value is never read.",
                "code": 6133,
                "severity": 4,
                "tags": [
                    1
                ],
                "source": "ts"
            }
        ],
        "only": [
            "quickfix.biome"
        ],
        "triggerKind": 2
    }
}

[Trace - 10:55:20 AM] Received response 'textDocument/codeAction - (24)' in 2ms.
Result: []

[Trace - 10:55:20 AM] Sending request 'textDocument/codeAction - (25)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts"
    },
    "range": {
        "start": {
            "line": 0,
            "character": 0
        },
        "end": {
            "line": 3,
            "character": 0
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 15
                    },
                    "end": {
                        "line": 2,
                        "character": 35
                    }
                },
                "message": "Do not use template literals if interpolation and special-character handling are not needed.",
                "code": "lint/style/noUnusedTemplateLiteral",
                "codeDescription": {
                    "href": "https://biomejs.dev/linter/rules/no-unused-template-literal"
                },
                "severity": 1,
                "source": "biome"
            },
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 12
                    }
                },
                "message": "This variable is unused.",
                "code": "lint/correctness/noUnusedVariables",
                "codeDescription": {
                    "href": "https://biomejs.dev/linter/rules/no-unused-variables"
                },
                "severity": 1,
                "source": "biome"
            },
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 12
                    }
                },
                "message": "'unused' is declared but its value is never read.",
                "code": 6133,
                "severity": 4,
                "tags": [
                    1
                ],
                "source": "ts"
            }
        ],
        "only": [
            "source.organizeImports.biome"
        ],
        "triggerKind": 2
    }
}

[Trace - 10:55:20 AM] Received response 'textDocument/codeAction - (25)' in 2ms.
Result: []

[Trace - 10:55:20 AM] Sending request 'textDocument/formatting - (26)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts"
    },
    "options": {
        "tabSize": 2,
        "insertSpaces": true
    }
}

[Trace - 10:55:20 AM] Received response 'textDocument/formatting - (26)' in 1ms.
Result: [
    {
        "newText": "// const unused = `hello`\n\nconst unused = `hellothereklajsdjk`\n",
        "range": {
            "end": {
                "character": 0,
                "line": 4
            },
            "start": {
                "character": 0,
                "line": 0
            }
        }
    }
]

[Trace - 10:55:20 AM] Sending notification 'textDocument/didSave'.
Params: {
    "textDocument": {
        "uri": "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts"
    }
}

[Trace - 10:55:20 AM] Sending request 'textDocument/codeAction - (27)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts"
    },
    "range": {
        "start": {
            "line": 0,
            "character": 0
        },
        "end": {
            "line": 3,
            "character": 0
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 15
                    },
                    "end": {
                        "line": 2,
                        "character": 35
                    }
                },
                "message": "Do not use template literals if interpolation and special-character handling are not needed.",
                "code": "lint/style/noUnusedTemplateLiteral",
                "codeDescription": {
                    "href": "https://biomejs.dev/linter/rules/no-unused-template-literal"
                },
                "severity": 1,
                "source": "biome"
            },
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 12
                    }
                },
                "message": "This variable is unused.",
                "code": "lint/correctness/noUnusedVariables",
                "codeDescription": {
                    "href": "https://biomejs.dev/linter/rules/no-unused-variables"
                },
                "severity": 1,
                "source": "biome"
            },
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 12
                    }
                },
                "message": "'unused' is declared but its value is never read.",
                "code": 6133,
                "severity": 4,
                "tags": [
                    1
                ],
                "source": "ts"
            }
        ],
        "triggerKind": 1
    }
}

[Trace - 10:55:20 AM] Received response 'textDocument/codeAction - (27)' in 3ms.
Result: [
    {
        "diagnostics": [
            {
                "code": "lint/style/noUnusedTemplateLiteral",
                "codeDescription": {
                    "href": "https://biomejs.dev/linter/rules/no-unused-template-literal"
                },
                "message": "Do not use template literals if interpolation and special-character handling are not needed.",
                "range": {
                    "end": {
                        "character": 35,
                        "line": 2
                    },
                    "start": {
                        "character": 15,
                        "line": 2
                    }
                },
                "severity": 1,
                "source": "biome"
            }
        ],
        "edit": {
            "changes": {
                "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts": [
                    {
                        "newText": "\"",
                        "range": {
                            "end": {
                                "character": 16,
                                "line": 2
                            },
                            "start": {
                                "character": 15,
                                "line": 2
                            }
                        }
                    },
                    {
                        "newText": "\"",
                        "range": {
                            "end": {
                                "character": 35,
                                "line": 2
                            },
                            "start": {
                                "character": 34,
                                "line": 2
                            }
                        }
                    }
                ]
            }
        },
        "kind": "quickfix.biome.style.noUnusedTemplateLiteral",
        "title": "Replace with string literal"
    },
    {
        "diagnostics": [
            {
                "code": "lint/style/noUnusedTemplateLiteral",
                "codeDescription": {
                    "href": "https://biomejs.dev/linter/rules/no-unused-template-literal"
                },
                "message": "Do not use template literals if interpolation and special-character handling are not needed.",
                "range": {
                    "end": {
                        "character": 35,
                        "line": 2
                    },
                    "start": {
                        "character": 15,
                        "line": 2
                    }
                },
                "severity": 1,
                "source": "biome"
            }
        ],
        "edit": {
            "changes": {
                "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts": [
                    {
                        "newText": "// biome-ignore lint/style/noUnusedTemplateLiteral: <explanation>\n",
                        "range": {
                            "end": {
                                "character": 0,
                                "line": 2
                            },
                            "start": {
                                "character": 0,
                                "line": 2
                            }
                        }
                    },
                    {
                        "newText": "  ",
                        "range": {
                            "end": {
                                "character": 6,
                                "line": 2
                            },
                            "start": {
                                "character": 5,
                                "line": 2
                            }
                        }
                    }
                ]
            }
        },
        "kind": "quickfix.suppressRule.biome.style.noUnusedTemplateLiteral",
        "title": "Suppress rule lint/style/noUnusedTemplateLiteral"
    },
    {
        "diagnostics": [
            {
                "code": "lint/correctness/noUnusedVariables",
                "codeDescription": {
                    "href": "https://biomejs.dev/linter/rules/no-unused-variables"
                },
                "message": "This variable is unused.",
                "range": {
                    "end": {
                        "character": 12,
                        "line": 2
                    },
                    "start": {
                        "character": 6,
                        "line": 2
                    }
                },
                "severity": 1,
                "source": "biome"
            }
        ],
        "edit": {
            "changes": {
                "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts": [
                    {
                        "newText": "_unused",
                        "range": {
                            "end": {
                                "character": 12,
                                "line": 2
                            },
                            "start": {
                                "character": 6,
                                "line": 2
                            }
                        }
                    }
                ]
            }
        },
        "kind": "quickfix.biome.correctness.noUnusedVariables",
        "title": "If this is intentional, prepend unused with an underscore."
    },
    {
        "diagnostics": [
            {
                "code": "lint/correctness/noUnusedVariables",
                "codeDescription": {
                    "href": "https://biomejs.dev/linter/rules/no-unused-variables"
                },
                "message": "This variable is unused.",
                "range": {
                    "end": {
                        "character": 12,
                        "line": 2
                    },
                    "start": {
                        "character": 6,
                        "line": 2
                    }
                },
                "severity": 1,
                "source": "biome"
            }
        ],
        "edit": {
            "changes": {
                "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts": [
                    {
                        "newText": "// biome-ignore lint/correctness/noUnusedVariables: <explanation>\n",
                        "range": {
                            "end": {
                                "character": 0,
                                "line": 2
                            },
                            "start": {
                                "character": 0,
                                "line": 2
                            }
                        }
                    },
                    {
                        "newText": "  ",
                        "range": {
                            "end": {
                                "character": 6,
                                "line": 2
                            },
                            "start": {
                                "character": 5,
                                "line": 2
                            }
                        }
                    }
                ]
            }
        },
        "kind": "quickfix.suppressRule.biome.correctness.noUnusedVariables",
        "title": "Suppress rule lint/correctness/noUnusedVariables"
    }
]

[Trace - 10:55:20 AM] Sending notification 'textDocument/didChange'.
Params: {
    "textDocument": {
        "uri": "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts",
        "version": 14
    },
    "contentChanges": [
        {
            "range": {
                "start": {
                    "line": 2,
                    "character": 34
                },
                "end": {
                    "line": 2,
                    "character": 35
                }
            },
            "rangeLength": 1,
            "text": "\""
        },
        {
            "range": {
                "start": {
                    "line": 2,
                    "character": 15
                },
                "end": {
                    "line": 2,
                    "character": 16
                }
            },
            "rangeLength": 1,
            "text": "\""
        }
    ]
}

[Trace - 10:55:20 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "diagnostics": [
        {
            "code": "lint/correctness/noUnusedVariables",
            "codeDescription": {
                "href": "https://biomejs.dev/linter/rules/no-unused-variables"
            },
            "message": "This variable is unused.",
            "range": {
                "end": {
                    "character": 12,
                    "line": 2
                },
                "start": {
                    "character": 6,
                    "line": 2
                }
            },
            "severity": 1,
            "source": "biome"
        }
    ],
    "uri": "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts",
    "version": 14
}

[Trace - 10:55:20 AM] Sending notification 'textDocument/didChange'.
Params: {
    "textDocument": {
        "uri": "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts",
        "version": 15
    },
    "contentChanges": [
        {
            "range": {
                "start": {
                    "line": 2,
                    "character": 6
                },
                "end": {
                    "line": 2,
                    "character": 6
                }
            },
            "rangeLength": 0,
            "text": "_"
        }
    ]
}

[Trace - 10:55:20 AM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "diagnostics": [],
    "uri": "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts",
    "version": 15
}

[Trace - 10:55:20 AM] Sending request 'textDocument/codeAction - (28)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/gustaf/Repos/Gustaf/biome-unsafe/index.ts"
    },
    "range": {
        "start": {
            "line": 0,
            "character": 0
        },
        "end": {
            "line": 3,
            "character": 0
        }
    },
    "context": {
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 2,
                        "character": 6
                    },
                    "end": {
                        "line": 2,
                        "character": 12
                    }
                },
                "message": "'unused' is declared but its value is never read.",
                "code": 6133,
                "severity": 4,
                "tags": [
                    1
                ],
                "source": "ts"
            }
        ],
        "triggerKind": 1
    }
}

[Trace - 10:55:20 AM] Received response 'textDocument/codeAction - (28)' in 1ms.
Result: []

Can you share the output of biome rage --daemon-logs?
Check the logs first, make sure there's no sensitive information you don't want to share.
Also, does that mean Biome works as expected when you don't do a live share of the project?

I will get back to you during the day with the logs
Yes biome works as expected when I don't have a liveshare active, it also seems to work when a liveshare is started and no one has joined yet.

@ematipico here is the logs
biome logs.txt

I was able to reproduce the issue.
When both you and the remote participant are connected to the live share session, the host saving the file does not apply the unsafe fixes, as expected. However, as soon as the guest participant saves the file, now both participants will trigger a fix when saving.


fixed error in python2 when printing unicode

Should now be py[23] compatible - tested it locally. Used six to check python versions.

Nice, thanks.


Get a 401 when trying to get url

Hi (me again :unamused: ),
I'm having an issue. I get a 401 error when I'm trying to get someting with my angular (iconic) app.
Here is the header :
GET /api/newsfeed HTTP/1.1
Host: acme.local
Connection: keep-alive
Accept: application/json, text/plain, */*
Origin: http://localhost
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9.eyJleHAiOjE0Mzc1NjY3OTMsInVzZXJuYW1lIjoiYW5nZWxhQG1haWwuY29tIiwiaWF0IjoiMTQzNzQ4MDM5MyJ9.zQ-HVmtCboibXVMIVBWP9t5oUf2zr_XU2VCIeEJohTZ3MfE2ZciAJv1tS-mjQ3J50SGAVFOMROsF58E5rX7FPJdjtRUU7fEOEWL0qSzlXwnSIsXenX-_Sd2MLxo4_C8rq_4HnQtRLE7sZpZ6oubVr4DoKVkWFm116fUzQL4QP84qdJApIbNXMeWpBbZtBBRqFT9y67dBf7mF_Ml_4EMMEKRU_kuParMOPp3cPuKeU8OWMg5TFj5lq5UweelShkHQskdEPkdlsjDPy5WuLfLjJVJjv-2nMBGOMUpZJ91tfg2FnTOLEUQUmSaPaJ1GxVh3HNjjr2VcPqTyx-dkXQ7WF0V_jSkIyoyOfjfk04FqNx47lsDyyaIxr_hs5CHvblmCt2ObTic-O_k8d9FBuVRJFVjTfrHUvB4NBvv7kwvICg57PbcQaHhFhoWfB7JScpD43cw7GaL4PsDLvcSEdz1Hoajvd6u6AowvtNanjDckVdC1egYWvm0tPgFtmfvqvKOGlV8_mFumRbXaxc-CK1Me5ZbcLsIZw25-z2VZqfekVbHNQqC54fwRBu2kX247Hsjgv0KPOGGmJ4AfLhttv6v4skiDZfhWg_AhvREQcgwkAChcOPUC-bniZmyHzCxofBcRALoMnixIDICRK-bdeD4h4ea5f87E2Xm3gvgLY-OX7V4
Referer: http://localhost/acmeApp/www/login.html
Accept-Encoding: gzip, deflate, sdch
Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4

And the response:
HTTP/1.1 401 Unauthorized
Date: Tue, 21 Jul 2015 12:06:34 GMT
Server: Apache/2.4.4 (Win32) PHP/5.4.16
Vary: Authorization
X-Powered-By: PHP/5.4.16
Set-Cookie: PHPSESSID=5232dq7k06ibkh7gejapc7clc6; path=/
Cache-Control: no-cache
Access-Control-Allow-Origin: http://localhost
Content-Length: 44
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: application/json

At the start I thought it was a problem with the login, but the header show the authorization token is present. So I've no more idea where to look.
My controller :
<?php

namespace Acme\NewsfeedBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use FOS\RestBundle\Controller\Annotations as FOSRest;
use Acme\NewsfeedBundle\Entity\Newsfeed;

/**
 * ApiController
 *
 * @FOSRest\NamePrefix("api_")
 */
class ApiController extends Controller
{
    /**
     * @throws AccessDeniedException
     * @return array
     */
    public function apiGetNewsfeedAction()
    {
        if (!$this->get('security.context')->isGranted('ROLE_USER')) {
            throw new AccessDeniedException();
        }

        $news = $this->getDoctrine()
                        ->getManager()
                        ->getRepository('AcmeNewsfeedBundle:Newsfeed')
                        ->getNewsfeed($count);

        return $news;
    }
}

security.yml
security:
    encoders:
        FOS\UserBundle\Model\UserInterface: sha512

    role_hierarchy:
        ROLE_MODO:        ROLE_USER
        ROLE_ADMIN:       ROLE_MODO
        ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_MODO, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]

    providers:
        fos_userbundle:
            id: fos_user.user_provider.username

    firewalls:
        dev:
            pattern:  ^/(_(profiler|wdt)|css|images|js)/
            security: false

        login:
            pattern:  ^/api/login
            stateless: true
            anonymous: true
            form_login:
                check_path:               /api/login_check
                username_parameter: username
                password_parameter: password
                success_handler:          lexik_jwt_authentication.handler.authentication_success
                failure_handler:          lexik_jwt_authentication.handler.authentication_failure
                require_previous_session: false
        api:
            pattern:   ^/api
            stateless: true
            lexik_jwt:
                authorization_header:
                    enabled: true
                    prefix:  Bearer
                query_parameter:
                    enabled: true
                    name:    bearer

        main:
            pattern: ^/
            form_login:
                provider: fos_userbundle
                csrf_provider: form.csrf_provider
            logout:       true
            anonymous:    true
            switch_user:  true
            remember_me:
                key:      "%secret%"
                lifetime: 31536000
                path:     /
                domain:   ~

    always_authenticate_before_granting: true

    access_control:
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/api/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/api,       roles: IS_AUTHENTICATED_FULLY }

config.yml
# JWT AUTH (API)
lexik_jwt_authentication:
    private_key_path: %jwt_private_key_path%
    public_key_path:  %jwt_public_key_path%
    pass_phrase:      %jwt_key_pass_phrase%
    token_ttl:        %jwt_token_ttl%

fos_rest:
    routing_loader:
        default_format: json
    param_fetcher_listener: true
    body_listener: true
    #disable_csrf_role: ROLE_USER
    body_converter:
        enabled: true
    view:
        view_response_listener: force

nelmio_cors:
    defaults:
        allow_credentials: false
        allow_origin: []
        allow_headers: []
        allow_methods: []
        expose_headers: []
        max_age: 0
    paths:
        '^/api/':
            allow_origin: ['*']
            allow_headers: ['*']
            allow_methods: ['POST', 'PUT', 'GET', 'DELETE']
            max_age: 3600

sensio_framework_extra:
    request: { converters: true }
    view:    { annotations: false }
    router:  { annotations: true }

I've no idea what give you more (code). So let me know.
The eventlistener in the sandbox are optional, no ? Be cause I don"t have them in my project.
Thx

Same error with config :
security:
    firewalls:
        ...
        api:
            pattern:   ^/api
            stateless: true
            lexik_jwt:
                authorization_header:
                    enabled: true
                    prefix:  Bearer
                query_parameter:
                    enabled: true
                    name:    bearer

Only query_parameter works, authorization_header always return 401.

Hi, what is your (development) server environment ? OS, Apache / Nginx, PHP version ?

Win7 Wamp Apache 2.4.4 PHP 5.4.16

Have a look at this there is a known issue with apache and authorization headers.
To check if your problem is related to it, please verify that the $request object contains this header or try running your application with the app/console server:run command.
Let me know if one of those solutions works for you.

@Irvyne what is your environment ?

I just edit comment above, it's Debian Jessie - PHP 5.6.9 - Nginx 1.6.2

@Irvyne I think there a problem with the spelling of the header HTTP_Autorizathion => HTTP_Authorization

Oups, sorry, it was a typo, I just correct it but it's still the same {"error":{"code":401,"message":"Unauthorized"}}

Does the sandbox works on your development environment ?

I find the problem, I had to replace HTTP_Authorization by Authorization
Correct command line
curl -X GET http://project.loc/api/users/1 -H "Autorizathion: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9.eyJleHAiOjE0Mzc1Nzg2NTAsInVzZXJuYW1lIjoidGhpYmF1ZC1hcGlAeW9vcGllcy5jb20iLCJpcCI6IjEyNy4wLjAuMSIsImlhdCI6IjE0Mzc0OTIyNTAifQ.smlelTP--cUB54-G3sbxAvbbEHmLYfer_Mu2J4OFizM5pLVqEOaMbU0GuP2zReU4IiGGxXhMuYjAJixgz_QmW7z3mnnwzyic9MFkYF_bv9-lgkZMjgo0NvxpfeGzPa22KnDM1ZSRj_Ly80xtnspot6v3lXrjxGv6x2kRAMKvq4UmXZvpPEhkiwfEeT0B61xBltqr7cpxNDqBNnkOO3HzQZr4isXcVZcGFQhpZ0wM5GVck76YAG6F9TzAoDeIScW0w_4XvzY_7-kEzAgCBH7zZTvnqwGghQQ1oSd1GNB5EHHtrE1anjjKn5sEY3AvWUeU7j50Vz7ojBXoOnOXEzEdIp9eVtFUHe5hrBhYJXcoSp6bEoZzBSlt0m7KP66rEqkPqbdz4UoTc90HRh7FyePTPgzg8jpMk_9xO-U8kv500Pvu4CmumqgzkAnswBWdSljQ9Me27Li7ko5TEkyCzDxPr8fJ_61v2sKW0dij9n7JGh8KYr-03x2wO0jKIm_BwYqHrcMrJ40FxMUbBf54DsSnnUlTByGRaLFnHQ6-JILB2ioh1omEyL720wYX6NUv_eklqyf8MzURVKakF2qEo_Xx3LtcLnnm2Hl-ExABddU624EgUTmm6pSyBe1ihudj8orksFdhSHFTd3T-smgWB15CzRwQ97sb3l2SwY-mK4z2TFI" -v

Sorry for the mistake.

Does the sandbox works on your development environment ?

No I get a 401 too for geting /pages.

I installed dependencies
Installed the assets
Created a vhost for the sandbox
Modify url in app.js
Restart WAMP
run php app/console server:run

vhost:
<VirtualHost *:80>
    DocumentRoot "c:/wamp/www/jwt/web/"
    ServerName jwt.local
    ErrorLog "logs/jwt-error.log"
    CustomLog "logs/jwt-access.log" common
    RewriteEngine On
    RewriteCond %{HTTP:Authorization} ^(.)
    RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
</VirtualHost>

@hotgeart The sandbox should work out of the box, using php built-in webserver. Please test it as described in the readme, without going through apache.

Ok the sandbox work

Any advance in making it work ?

With this code (below) can I verify if HTTP_AUTHORIZATION is passed ?
<?
    public function apiGetNewsfeedAction()
    {
        $request = $this->get('request');
        return  $request->headers;
    }

If yes, I didn't see authorization

I had the same problem and it's because the latest version of symfony reformat token passed through header by removing dots and adding == at the end, so in the method JWS:load the token is not valid.
One possible fix is to use the function apache_request_headers instead of $request->headers->get() in the JWTListener:handle method.
Anyone have a better solution ?

I've no idea how I did it, but's working now. I tested many things I found around the web.
I've no idea what solution worked and I don't want to touch my project to find out. Now it's working I don't want to risk to crash again.
Thx

I found a better solution, using a kernel request listener to set sf2 request headers after getting them by apache_request_headers() function

@hotgeart Cool, if you ever find out how you did it let us know !
@sidux Do you mind sharing a code example ?

Hi of corse, an exemple of a kernel.event_listener
   public function onKernelRequest(GetResponseEvent $event)
    {
        $headers = $event->getRequest()->headers;
        if (function_exists('apache_request_headers')) {
            $allHeaders = apache_request_headers();
            if (isset($allHeaders['Authorization'])) {
                $headers->set('Authorization', $allHeaders['Authorization']);
            }
        }
    }

I have done this because the value of $headers->get('token')and apache_request_headers()['token']are different, the first one is somehow reformated.

getting error "Failed to load resource: the server responded with a status of 401 (Unauthorized)"
i m using laravel 5.2 with angularjs JWT for passing token based auth.

How do you use this bundle in laravel ?  😮

@chalasr which bundle..?

This bundle! (LexikJWTAuthenticationBundle). You are saying that you uses Laravel, where do you require this bundle and how it can helps you in your issue?

@chalasr  i am using JWT with laravel
you can see link- https://github.com/tymondesigns/jwt-auth/wiki/Installation

@jthanki If you have an error with https://github.com/tymondesigns/jwt-auth/wiki/Installation, you have to open an issue on https://github.com/tymondesigns/jwt-auth/issues ...... Not here.
You can find lots of JWT packages that are totally unrelated, if you have an issue with one of them, contact the support of the corresponding package.

@chalasr when i am getting authenticate request to laravel side that time i got an error of unauthorized credentials
error- status code - 401 at laravel side
when i hit url from angularjs side to laravel side for authentication then i got error 401
error- "POST http://final-jai-sanedevs.c9users.io/api/auth 401 (Unauthorized)"

@jthanki I cannot help you here, you are not talking about the same thing that this issue!
Please go on [tymondesign/jwt-auth]` Then open an issue for your problem to see if they can help, but we can't do anything for you!

@chalasr sorry and thanks for helping