[git-exporter] jq: error (at :1): Cannot iterate over null (null)

Which addon?
git-exporter
Describe the bug
It no longer runs due to failing to get add-ons:

To Reproduce
Unclear, it may be a HA version thing. I have fiddled around a bit and deduced that based on https://github.com/Poeschl/Hassio-Addons/blob/0e0cd58135754f7fdddbb29431b07d766af6f63e/git-exporter/root/run.sh#L142 ... the /addons call used to have a top-level "repositories" key.
On HA 2022.7, this appears not to be the case (not sure when it broke).
[core-ssh ~]$ bashio::api.supervisor GET "/addons" false | jq -C 'keys'
[
  "addons"
]

Based on https://developers.home-assistant.io/docs/api/supervisor/endpoints/, it seems like it should be using /store/repositories instead:
[core-ssh ~]$ bashio::api.supervisor GET "/store/repositories" false | jq -C '.[]|keys[]'|sort -u
"maintainer"
"name"
"slug"
"source"
"url"

System

Home Assistant 2022.7.5
Supervisor 2022.07.0
Operating System 8.2
Frontend 20220707.1

Waiting for an answer on https://github.com/hassio-addons/bashio/issues/111 for this.

The retrieval of the addon config changed. That shouldn't delete all configs. Are they added again?

They are not. They just don't export anymore.
The only thing in the addons dir is the repositories.yaml - https://git.bjeanes.com/bo/ha-config/src/branch/main/addons

Do you find any log output from this line bashio::log.info "Get ${addon} configs" on your last run?
If not the addons api have changed also.

That line doesn't even show up, even though I have addons: true in configuration:
[14:25:01] INFO: Start git export
[14:25:01] INFO: Pull latest
From https://git.bjeanes.com/bo/ha-config
   715aeff..8d3df54  main       -> origin/main
HEAD is now at 8d3df54 Ignore solcast forecast file
[14:25:02] INFO: Get Home Assistant config
[14:25:02] INFO: Get Lovelace config yaml
[14:25:03] INFO: Get ESPHome configs
[14:25:04] INFO: Get addon repositories
[14:25:04] INFO: Get Node-RED flows
[14:25:05] INFO: Add secrets pattern
[14:25:05] INFO: Add secrets from secrets.yaml
[14:25:05] INFO: Prohibited patterns:
password:\s?[\'"]?\w+[\'"]?\n?
token:\s?[\'"]?\w+[\'"]?\n?
client_id:\s?[\'"]?\w+[\'"]?\n?
api_key:\s?[\'"]?\w+[\'"]?\n?
chat_id:\s?[\'"]?\w+[\'"]?\n?
allowed_chat_ids:\s?[\'"]?\w+[\'"]?\n?
latitude:\s?[\'"]?\w+[\'"]?\n?
longitude:\s?[\'"]?\w+[\'"]?\n?
credential_secret:\s?[\'"]?\w+[\'"]?\n?
[14:25:05] INFO: Checking for secrets
[14:25:06] INFO: Commit changes and push to remote
[main 8f1ebd0] Home Assistant Git Exporter
 2 files changed, 4 insertions(+), 3 deletions(-)
remote: . Processing 1 references
remote: Processed 1 references in total
To https://git.bjeanes.com/bo/ha-config.git
   8d3df54..8f1ebd0  main -> main
[14:25:15] INFO: Exporter finished

Seems that we have a new issue then 😅
The return of the addons does not return any installed addons or has changed. 😐

I tested this in Terminal add-on.
I have this helper to experiment with bashio commands interactively:
function bashio() {
  # load bashio, then unset flags which cause it to exit on any failure
  bash --init-file <(echo "source /usr/lib/bashio/bashio.sh; set +o errexit; set +o errtrace; set +o nounset; set +o pipefail")
}

Here:
~ $ bashio::addons.installed # no output
~ $ bashio::addons | jq '.addons | length'
23
~ $ bashio::addons | jq '.addons[0]'
{
  "name": "Samba share",
  "slug": "core_samba",
  "description": "Expose Home Assistant folders with SMB/CIFS",
  "advanced": false,
  "stage": "stable",
  "version": "10.0.0",
  "version_latest": "10.0.0",
  "update_available": false,
  "available": true,
  "detached": false,
  "homeassistant": null,
  "state": "started",
  "repository": "core",
  "build": false,
  "url": "https://github.com/home-assistant/hassio-addons/tree/master/samba",
  "icon": true,
  "logo": true
}
~ $ bashio::addons.installed core_samba
true

It looks like you are already iterating over the addons to check if installed https://github.com/Poeschl/Hassio-Addons/blob/f67bb090029561153d8b40a541d9f6fb3111b5a2/git-exporter/root/run.sh#L133-L134
So in principle, just removing .installed here should fix the issue https://github.com/Poeschl/Hassio-Addons/blob/f67bb090029561153d8b40a541d9f6fb3111b5a2/git-exporter/root/run.sh#L131
WDYT?


Added additional phpdoc separation cases

Hopefully, this will demonstrate that the phpdoc separation fixer crashes. Related to https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/4869.

Unfortunately travis didn't run due to the unreliable dev-tools phar stuff.

Hmm, none of these cases seem to crash it.


Cannot read properties of undefined (reading 'getItemsByProvider')

TypeError: Cannot read properties of undefined (reading 'getItemsByProvider')
at ia.E in src/vs/editor/contrib/suggest/browser/suggestModel.ts:653:39
at ia.A in src/vs/editor/contrib/suggest/browser/suggestModel.ts:439:8
at <anonymous> in src/vs/editor/contrib/suggest/browser/suggestModel.ts:213:10
at u.invoke in src/vs/base/common/event.ts:692:17
at d.deliver in src/vs/base/common/event.ts:899:22
at h.fire in src/vs/base/common/event.ts:860:24
at <anonymous> in src/vs/editor/browser/widget/codeEditorWidget.ts:1684:36
at u.invoke in src/vs/base/common/event.ts:692:17
at s.deliver in src/vs/base/common/event.ts:899:22
at h.fire in src/vs/base/common/event.ts:860:24
at L.n in src/vs/editor/common/viewModelEventDispatcher.ts:64:18
at L.endEmitViewEvents in src/vs/editor/common/viewModelEventDispatcher.ts:109:8
at v.M in src/vs/editor/common/viewModel/viewModelImpl.ts:1086:26
at v.L in src/vs/editor/common/viewModel/viewModelImpl.ts:1023:8
at v.executeEdits in src/vs/editor/common/viewModel/viewModelImpl.ts:1026:8
at rn.executeEdits in src/vs/editor/browser/widget/codeEditorWidget.ts:1221:29
at R.execute in src/vs/editor/contrib/format/browser/formattingEdit.ts:57:11
at T in src/vs/editor/contrib/format/browser/format.ts:349:18
at async k in src/vs/editor/contrib/format/browser/format.ts:302:3
at async w.participate in src/vs/workbench/contrib/codeEditor/browser/saveParticipants.ts:251:4
at async in src/vs/workbench/services/textfile/common/textFileSaveParticipant.ts:53:6

Go to Errors Site

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.
Happy Coding!


[release-0.59] Backport operator tests split

What this PR does / why we need it:
This is a backport of https://github.com/kubevirt/kubevirt/pull/9135 https://github.com/kubevirt/kubevirt/pull/9164 https://github.com/kubevirt/kubevirt/pull/9186 https://github.com/kubevirt/kubevirt/pull/9211
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:

NONE

/retest
/cc @dhiller @acardace

Included https://github.com/kubevirt/kubevirt/pull/9251

/lgtm

/approve

/retest


please make possible with ignoredFiles to ignore entire subdirectory structure

ATM, after not giving up initially I already breeded all kinds of possible globs for previous layouts:
$ cat ~/heudiconv/heuristics/dbic_bids_validator.cfg
{
    "ignore": [
       "TOTAL_READOUT_TIME_NOT_DEFINED"
    ],
    "warn": [],
    "error": [],
    "ignoredFiles": [
          "/.heudiconv/*", "/.heudiconv/*/*", "/.heudiconv/*/*/*", "/.heudiconv/*/*/*/*",
          "/.heudiconv/.git*", "/.heudiconv/.git/*",
          "/.git*",
          "/.datalad/*", "/.datalad/.*",
          "/.*/.datalad/*", "/.*/.datalad/.*",
          "/sub*/ses*/*/*__dup*", "/sub*/*/*__dup*"
    ]

$ /usr/bin/bids-validator -c ~/heudiconv/heuristics/dbic_bids_validator.cfg  $PWD
        1: This file is not part of the BIDS specification, make sure it isn't included in the dataset by accident. Data derivatives (processed data) should be placed in /derivatives folder. (code: 1 - NOT_INCLUDED)
                /.heudiconv/.git/annex/index
                        Evidence: index
                /.heudiconv/.git/annex/index.lck
                        Evidence: index.lck
                /.heudiconv/.git/annex/journal.lck
                        Evidence: journal.lck
                /.heudiconv/.git/annex/mergedrefs
                        Evidence: mergedrefs
                /.heudiconv/.git/annex/objects/09/5W/MD5E-s33197--56896ef4c721ba81607438c44877d6d2.py/MD5E-s33197--56896ef4c721ba81607438c44877d6d2.py
                        Evidence: MD5E-s33197--56896ef4c721ba81607438c44877d6d2.py

but pretty much I now need to define some quite obnoxiously deep globs to ignore any file under .git .datalad subdirectories. Also making directories starting with . even so special.  I am not sure what would be the easiest in JS/nodejs , but if it could be some kind of a regex, or smarter glob (e.g. with ** to signal any depth), or just have trailing / in the path to signal to ignore anything under that directory (and below) would be super handy ;)
FWIW -- my version is 0.21.3

The '**' syntax is implemented. See #349.

Is that the power of JS to pick up changes for mere documentation description (which is what #349 about)? ;)  I just wanted to see how it is done in JS but can't seems to find any relevant recent commit.. but even with 0.23.2 it seems to do the ** matching, so I guess it was always working and just not documented?
The only gotcha is that it doesn't include directories starting with ..  So, to e.g. ignore .heudiconv git submodule I need to have 3 lines:
          "/.heudiconv/**",  # all regular subdirs
          "/.heudiconv/.git*",  # all the .gitignore etc files
          "/.heudiconv/.git/**",  # everything under .git which hopefully would never have . files


Mel frequency scaling

This change extends SpectrogramConfig by a dataclass field to enable and
configure mel frequency scaling and implements that scaling in the call
to the Spectrogram layer.

Sorry if I am creating email spam. Let me know if I am. It's not clear to me whether comments are drafts.


Snippets for new Auth admin features

Get user by federated ID:
https://github.com/firebase/firebase-admin-node/pull/769/files
Link/unlink federated in update:
https://github.com/firebase/firebase-admin-node/pull/770/files
Enable anon auth in tenant config:
https://github.com/firebase/firebase-admin-node/pull/802/files

@rsgowman could you take a look at these?  Even nitpicks on naming/comments are useful because once you approve of these I will use them as a template for the snippets in other languages.


PHP: Generate per-option docs for oneof fields

Some oneof fields don't have proto docs for each item in the oneof, e.g. https://github.com/googleapis/googleapis/blob/master/google/privacy/dlp/v2/dlp.proto#L2074
In this case, toolkit should pull the docs from the oneof type.

We currently have a workaround in the synth.py script to update these doc strings.

Closing as no longer relevant - if there is still a need for this, please reopen.


Overriden project variable does not hide correct variable in dashboard toolbar

Tried using shortcut to hide a project variable and it didn't hide the variable in the dashboard toolbar that I was expecting.
Bug example:
https://github.com/perses/perses/assets/9369625/4a1c80f9-9a8b-4b01-9337-4d14843b5de1

@celian-garcia not sure if I was doing something wrong but overriding a project variable has unexpected behavior

You need to toggle off the visibility to hide variable. Or I don´t understand the problem

Whoops not sure how I forgot, sorry about that @celian-garcia 😅


Server crashes when Bedrock players join

Reporting it as a separate bug here so it's tracked since the other bug (#52) is closed.
I'll just refer to my comments there for the details:
https://github.com/GeyserMC/Floodgate-Fabric/issues/52#issuecomment-1153151645
https://github.com/GeyserMC/Floodgate-Fabric/issues/52#issuecomment-1153585276

Update Geyser-Fabric - this should have been fixed there.

Update Geyser-Fabric - this should have been fixed there.

Yep, I could confirm this with the help of a Bedrock player now!
Thank you so much for your effort, it's really appreciated!


Allow Host Registrations to Improve #Open

the #map or #proxy pattern strings can include the scheme to match against


Ability to export and import objects to/from binary blobs and JSON

Moving data between applications and/or languages is much easier when objects can be serialized in a platform independent manner.
It would be even more amazing if the serialization format worked like captain proto so that objects do not need to be parsed when loaded.

I gave a little thought about a binary format (like java's class, python's pyc). Is it what you have in mind or something more specific (like C++ modules)?

Possibly include this module into wren's default modules?
It's quite a small library, and I'd consider JSON parsing a pretty vital feature for any language
Otherwise I'd be happy to try to write a native c parser?


[9.4] Upgrade maven-assembly-plugin to 3.1.1 to reduce memory usage

https://issues.jboss.org/browse/assembly311-9.4.x

Integrated but with the Jira in the commit message: https://github.com/infinispan/infinispan/commit/1ea01ad410c0bded84b3033762cf7579b393df59
Thanks @tristantarrant


Major rework of photo handling

fetch contact photo from contact API
reformat to contain fully validated html on all mail clients
Include freely usable default avatar, hard-coded to reduce
external requests and optimize run-time of script
warning free with ESLint v7.0.0

fixes #162

I did re-format the html email to comply with standards. It is fully valid html and uses only elements which are supported on all clients. I referred to https://www.campaignmonitor.com/
I replaced the avatar image for contacts without photos with a free one to not violate copyrights of someone (google?). To reduce network requests I included it hard-coded in the source. Resolution is high enough even for retina-resolution clients.
Images are sized based on em to scale with different font sizes.
Tested with Thunderbird on desktop, K9 on mobile and GMX as webmailer.
GMX:

K9:

Thunderbird:

Specifically verified with:
https://validator.w3.org/
https://www.campaignmonitor.com/css/
https://eslint.org/demo

I want to add: I did not fully understand what is left to merge as there are no Google+ profiles any more. In my setup all contacts having photos show up properly. Potentially the merging needs to be adjusted a bit around the default contact picture.

Hello @stephankn: thank you for your contribution and I am really sorry for letting you wait.
Lots of people have requested a better support for profile images of the various contacts, but it looks like Google is making this quite hard...
I've rapidly tested your implementation and with my contacts it does not look like it resulted in more photos being shown than before, however while reasearching for other methods to fetch a contact profile photo I found out that the API you used will be deprecated in less than a year.
I do not think deploying this change only to take it back in less than a year would be worth it especially due to the slow update cycle of this project.
I'll consider in the next days merging the other part (regarding the restyling of the HTML code) which I must say looks quite nice.
Thank you again


Add a command for listing MIDI devices

Tasks:

[x] Create general purpose MIDI code for this
[x] Add support for a list-devices command
[x] Render this to CLI
[ ] Return this to undermidi as binary Erlang terms

Depends on:

#5

Gonna skip that last one for now.


Use fastify req.routeConfig instead of res.context.config

Motivation
With update to Fastify v4 in https://github.com/ChainSafe/lodestar/pull/5369, res.context.config has been deprecated
@deprecated — Use Request#routeConfig or Request#routeSchema instead

Description
Use fastify req.routeConfig instead of res.context.config

:tada: This PR is included in v1.8.0 :tada:


pyload-ng: init at 0.5.0b3.dev69

Description of changes
This packages the newer pyload-ng version of pyload, a download manager with support for 1-click-hosting sites.
The old pyload got dropped from nixpkgs in 2021 due to being unmaintained: https://github.com/NixOS/nixpkgs/commit/c0914a76c40230fb06eb6df8f54995796edef3ef
Potential future work: writing a NixOS service for autostarting
Things done

Built on platform(s)

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

[x] Tested basic functionality of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

should the pyload throw alias be removed then (or mention the pyload-ng package)?

we could do that

@ofborg eval

should be ready now :)

oh no! what happened? I did the rebase on a fresh clone but afterwards it required me to pull from the remote pyload and merge it with my local branch...

Oh, I had to force push since the histories had diverged, makes sense in retrospect. Sorry for pinging like 50 people :')

Please file a new PR: we cannot unsubcribe everyone, so all the activity in here will ping a lot of people.


sched: Rename note_add to sched_note_add

Summary
to better match other sched_note_* function and fix the comment in Kconfig
Impact
Testing

@davids5 fix the comment in Kconfig.

interface

Why? This is an internal function expose to the public header files just a couples of days ago, please review the related patch again: https://github.com/apache/incubator-nuttx/pull/1520
There is no external user yet. To keep https://github.com/apache/incubator-nuttx/pull/1520 change as small as possible, I split the rename patch to here.

I am referring to changing https://github.com/apache/incubator-nuttx/pull/1747/commits/4e45a66e5142b5d7df37a07b17e30d3fa4bc4262
This schedule_note_xxxx interface has been used for years. It is an API to board-specific logic it does not require a de-multiplexer the APIs are focused.   Please do not misinterpret the note: "NOTE: This is an internal OS interfaces and are called at at very critical locations in the OS." (it is the same as SPI selects that are defined by the board)
What it means is It is an API to board-specific logic that should NOT waist any time.
The proposal of 1) queuing a data type and 2) de-queuing it and 3) de-multiplexing it not useful in the original intent:
That is to note an event of a specific kind.
Feel free to extend the use case but not change the interface. That is a breaking change.

I am referring to changing 4e45a66
This schedule_note_xxxx interface has been used for years. It is an API to board-specific logic it does not require a de-multiplexer the APIs are focused. Please do not misinterpret the note: "NOTE: This is an internal OS interfaces and are called at at very critical locations in the OS." (it is the same as SPI selects that are defined by the board)
What it means is It is an API to board-specific logic that should NOT waist any time.

The board interface may change sometime if there is a good techinical reason, for example here is your change:
commit ed5d00edd877c0489b8281c476a5d3dd35628bca
Author: David Sidrane<EMAIL_ADDRESS>Date:   Tue Aug 4 10:14:54 2020 -0700

    board_crashdump:use consistent type from outer function for file name

which also break other people's code. Should we forbid this change and revert it? I don't think so, because the change is good from the technology perspective.

The proposal of 1) queuing a data type and 2) de-queuing it and 3) de-multiplexing it not useful in the original intent:
That is to note an event of a specific kind.
Feel free to extend the use case but not change the interface. That is a breaking change.

The break can't avoid to get the better design or fix the new challenge, here is the partial list the recent change which break the compatibility in some way:
https://github.com/apache/incubator-nuttx/commit/797bf447d1171e46e42e6bee1036c5511f23f1d1
https://github.com/apache/incubator-nuttx/commit/797bf447d1171e46e42e6bee1036c5511f23f1d1
https://github.com/apache/incubator-nuttx/commit/a0ce81d65914fdedab4f7418442e3fdc12331b71
https://github.com/apache/incubator-nuttx/commit/875828b6981c90238137b22b047158b95e7e0d45
https://github.com/apache/incubator-nuttx/commit/f92dba212d1551f541dfedd61a6ad1401d8aaff4
https://github.com/apache/incubator-nuttx/commit/153eee6de2ec204a886f0edc4e7a3021ab5e8fc4
https://github.com/apache/incubator-nuttx/commit/c2244a2382cf9c62937cc558cc947fae9f211b81
What should we do with these patches?

First, the naming is totally wrong.  You cannot push to or pop from a FIFO.  That is incorrect.  Push and pop refer only stacks (LIFOs).  Very amateurish.Sent from Samsung tablet.
-------- Original message --------From: Xiang Xiao<EMAIL_ADDRESS>Date: 9/10/20  9:20 PM  (GMT-06:00) To: apache/incubator-nuttx<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: Re: [apache/incubator-nuttx] sched: Rename note_add to sched_note_add (#1747)
I am referring to changing 4e45a66
This schedule_note_xxxx interface has been used for years. It is an API to board-specific logic it does not require a de-multiplexer the APIs are focused. Please do not misinterpret the note: "NOTE: This is an internal OS interfaces and are called at at very critical locations in the OS." (it is the same as SPI selects that are defined by the board)
What it means is It is an API to board-specific logic that should NOT waist any time.
The board interface may change sometime if there is a good techinical reason, for example here is your change:
commit ed5d00edd877c0489b8281c476a5d3dd35628bca
Author: David Sidrane<EMAIL_ADDRESS>Date:   Tue Aug 4 10:14:54 2020 -0700
board_crashdump:use consistent type from outer function for file name

which also break other people's code. Should we forbid this change and revert it? I don't think so, because the change is good from the technology perspective.
The proposal of 1) queuing a data type and 2) de-queuing it and 3) de-multiplexing it not useful in the original intent:
That is to note an event of a specific kind.
Feel free to extend the use case but not change the interface. That is a breaking change.
The break can't avoid to get the better design or fix the new challenge, here is the partial list the recent change which break the compatibility in some way:
797bf44
797bf44
a0ce81d
875828b
f92dba2
153eee6
c2244a2
What should we do with these patches?
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.

First, the naming is totally wrong.  You cannot push to or pop from a FIFO.  That is incorrect.  Push and pop refer only stacks (LIFOs).

It isn't wrong, I am use the term from queue definition from C++ standard:
https://en.cppreference.com/w/cpp/container/queue
Also, it's a term issue with the context which doesn't affect you understand what I mean.

@xiaoxiang781216 - This is foolish,  fixing an API is completely different then hijacking it.
In the case you are referencing, the the fix is to change the type. - The compiler tells the user what to fix - Done. We do this all the time.
In this situation it can not be fixed externally. (it can be but using weak, or wrapping seem almost as foolish as this discussion)
You are hijacking a the functions names of EXTERNAL call outs. What do you expect, the remedy to be?

@xiaoxiang781216 Because you split out the commits discussed herein to a different PR All the comments are not appropriate anymore. Please close this PR and open a new one for this change (which from my perspective, is fine )

I will move all comment to PR https://github.com/apache/incubator-nuttx/pull/1520.

@davids5 do you have more comment? If not, please merge it.


Coloring inside function calls

Describe the bug
The all of the code in the argument section of function calls are blue.
To Reproduce
Steps to reproduce the behavior:
View:
//Thread used to read chat messages and send them to the server
           std::thread writer([this, username]() {
                   forever {
                       ClientContext temp_context;
                       Empty temp_empty;
                       std::string input = strip(getPostMessage());
                       if(input == "") continue;

                       Message m = MakeMessage(username, input);
                       // stream->Write(m);
                       Status write_status;
                       write_status = stub_->Post(&temp_context, m, &temp_empty);

                       if(!write_status.ok()) {
                           std::cout << "Problem writing post. Please try again..." << std::endl;
                           return;
                       }
                   }
               });

Expected behavior
The all of the code in the argument section of function would be normally colored.
Screenshots
When lambda is inside of the function arguments

When lambda is outside of the function arguments

Additional context
I do not use the Material Theme myself (although I appreciate it). I maintain the C++ syntax and 5 of my friends have sent me bug reports of this being messed up, even though it's not a syntax issue, so I figured I post it here. Ideally the code colors would not drastically change when the meaning of the code hasn't changed at all.
The fix can be made by removing the meta.function-call tag from the "Function, Special Method" section.

Hi, we can't replicate this issue using Better C++ Syntax extension:

Sorry about that, I didn't realize the external function was affecting it. Here's the full code that should reproduce it:
void Client::Timeline(const std::string& username) {
        //
        // Example 1
        //
            //
            // Seperated
            //
            auto b = (std::string)(var1)
            auto a = func1(b)
            //
            // Nested
            //
            auto a = func1((std::string)(var1))

        //
        // Example 2
        //
            //
            // seperated
            //
            auto b = [this, username]() {
                    ClientContext temp_context;
                    Empty temp_empty;
                    return true;
                };
            auto a = std::thread writer( b );
            //
            // nested
            //
            auto a = std::thread writer([this, username]() {
                ClientContext temp_context;
                Empty temp_empty;
                return true;
            });
    }

Hi @jeff-hykin, we think there is a problem with the Better C++ Syntax extension.  This extension assign different language scopes so the theme highlights them differently. I think you should report this issue to the extension authors with scopes screenshots (You can run the tool form the command palette searching for "Scope")

Actually, coincidentally enough, I am the author of Better C++ Syntax haha. The extension is also the source for the VS Code C++ grammar, so if it is a problem with the extension now, it'll be a problem with stock VS Code in a month or two. Many times highlighting issues are caused by the extension because since it is testing changes, but I don't think that is the case here.

In this situation Ideally all function calls e.g. afunc(); would be tagged with the meta.function-call scope, including everything between the ()'s. This is in accordance with TextMate naming conventions and is the way many other languages grammar works as well, so I believe the scopes are correct. The issue is that the theme ties the meta.function-call with the blue color.


Web scraping

web scraping can also be used?

First of all, please ask the question in the discussions, not in the issues. Your question is not an issue of the project. Secondly, please expand the question and specify web scraping used for what, what purpose it has in this specific project. Thank you


Internal Server Error testing "/api/v1/3gpp-monitoring-event/v1/{scsAsId}/subscriptions" from SWAGGER

Hi all,
I have installed the NEF emulator in standalone mode. In my .env I have:
EXTERNAL_NET=false
USE_PUBLIC_KEY_VERIFICATION=false
I am trying to test the monitoring event API through SWAGGER. The steps I follow are:

Authorize SWAGGER setting:
username<EMAIL_ADDRESS>password: pass

When I call "GET /api/v1/3gpp-monitoring-event/v1/myNetapp/subscriptions", it correctly returns 204, as no

I try to create a registration with: "POST /api/v1/3gpp-monitoring-event/v1/myNetapp/subscriptions", and the default body:
{
"externalId"<EMAIL_ADDRESS>"notificationDestination": "http://localhost:80/api/v1/utils/monitoring/callback",
"monitoringType": "LOCATION_REPORTING",
"maximumNumberOfReports": 1,
"monitorExpireTime": "2023-05-25T19:16:48.509Z",
"maximumDetectionTime": 1,
"reachabilityType": "DATA"
}

Here I get a 500 and internal server error, with the error trace that I paste below. I would appreciate any insight in how to debug this issue.
BR
Daniel
nef_emulator-backend-1        | INFO:     <IP_ADDRESS>:43012 - "POST /api/v1/3gpp-monitoring-event/v1/myNetapp/subscriptions HTTP/1.0" 500 Internal Server Error
nef_emulator-reverse_proxy-1  | <IP_ADDRESS> - - [23/May/2023:19:37:41 +0000] "POST /nef/api/v1/3gpp-monitoring-event/v1/myNetapp/subscriptions HTTP/1.1" 500 21 "https://<IP_ADDRESS>:4443/nef/docs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36" "-"
nef_emulator-backend-1        | ERROR:    Exception in ASGI application
nef_emulator-backend-1        | Traceback (most recent call last):
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 372, in run_asgi
nef_emulator-backend-1        |     result = await app(self.scope, self.receive, self.send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in call
nef_emulator-backend-1        |     return await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 269, in call
nef_emulator-backend-1        |     await super().call(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 124, in call
nef_emulator-backend-1        |     await self.middleware_stack(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
nef_emulator-backend-1        |     await self.app(scope, receive, _send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 69, in call
nef_emulator-backend-1        |     await response(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 253, in call
nef_emulator-backend-1        |     async with anyio.create_task_group() as task_group:
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 662, in aexit
nef_emulator-backend-1        |     raise exceptions[0]
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 256, in wrap
nef_emulator-backend-1        |     await func()
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 245, in stream_response
nef_emulator-backend-1        |     async for chunk in self.body_iterator:
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 58, in body_stream
nef_emulator-backend-1        |     raise app_exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 36, in coro
nef_emulator-backend-1        |     await self.app(scope, request.receive, send_stream.send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 92, in call
nef_emulator-backend-1        |     await self.simple_response(scope, receive, send, request_headers=headers)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 147, in simple_response
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 93, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 82, in call
nef_emulator-backend-1        |     await self.app(scope, receive, sender)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
nef_emulator-backend-1        |     raise e
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 670, in call
nef_emulator-backend-1        |     await route.handle(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 418, in handle
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 269, in call
nef_emulator-backend-1        |     await super().call(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 124, in call
nef_emulator-backend-1        |     await self.middleware_stack(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
nef_emulator-backend-1        |     await self.app(scope, receive, _send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 93, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 82, in call
nef_emulator-backend-1        |     await self.app(scope, receive, sender)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
nef_emulator-backend-1        |     raise e
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 670, in call
nef_emulator-backend-1        |     await route.handle(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 266, in handle
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 65, in app
nef_emulator-backend-1        |     response = await func(request)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 227, in app
nef_emulator-backend-1        |     raw_response = await run_endpoint_function(
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 162, in run_endpoint_function
nef_emulator-backend-1        |     return await run_in_threadpool(dependant.call, **values)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
nef_emulator-backend-1        |     return await anyio.to_thread.run_sync(func, *args)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
nef_emulator-backend-1        |     return await get_asynclib().run_sync_in_worker_thread(
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
nef_emulator-backend-1        |     return await future
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
nef_emulator-backend-1        |     result = context.run(func, *args)
nef_emulator-backend-1        |   File "/app/./app/api/api_v1/endpoints/monitoringevent.py", line 91, in create_subscription
nef_emulator-backend-1        |     ccf_logs(http_request, json_response, "service_monitoring_event.json", token_payload.get("sub"))
nef_emulator-backend-1        | AttributeError: 'NoneType' object has no attribute 'get'

Hi all,
I have realized the error occurs in: ./backend/app/app/api/api_v1/endpoints/monitoringevent.py
Specifically, within this block of code:
    #CAPIF Core Function Logging Service
    try:
        response = http_response.body.decode("utf-8")
        json_response = {}
        json_response.update({"response" : response})
        json_response.update({"status_code" : str(http_response.status_code)})
        ccf_logs(http_request, json_response, "service_monitoring_event.json", token_payload.get("sub"))
    except TypeError as error:
        logging.critical(f"Error: {error}")

However, I have not deployed CAPIF in my setup. Do I need it? Can the NEF emulator work in standalone mode without CAPIF?
BR
Daniel

Hello Daniel,
I have fixed the error catching the Attribute Error exception when you use NEF without CAPIF.
see commit #cca77cc
Please try again to ensure that the issue is resolved.

Hi,
Yes, the commit seems to solve the issue I was having and I could verify that I can create a subscription.
However, I observed that I still have the problem if I try to create a subscription with "maximumNumberOfReports" bigger than 1. For example the following payload gives me a 500:
{
"externalId"<EMAIL_ADDRESS>"notificationDestination": "http://localhost:80/api/v1/utils/monitoring/callback",
"monitoringType": "LOCATION_REPORTING",
"maximumNumberOfReports": 2,
"monitorExpireTime": "2023-05-25T14:27:22.491Z",
"maximumDetectionTime": 1,
"reachabilityType": "DATA"
}
It is interesting though that after I get the 500, the subscription appears to be created, i.e. I can get it with the GET endpoint. I paste below the error trace, which seems to be again in the logging function.
BR
Daniel
nef_emulator-backend-1        | INFO:     <IP_ADDRESS>:59888 - "POST /api/v1/3gpp-monitoring-event/v1/myNetapp/subscriptions HTTP/1.0" 500 Internal Server Error
nef_emulator-reverse_proxy-1  | <IP_ADDRESS> - - [24/May/2023:14:42:19 +0000] "POST /nef/api/v1/3gpp-monitoring-event/v1/myNetapp/subscriptions HTTP/1.1" 500 21 "https://<IP_ADDRESS>:4443/nef/docs" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36" "-"
nef_emulator-backend-1        | ERROR:    Exception in ASGI application
nef_emulator-backend-1        | Traceback (most recent call last):
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 372, in run_asgi
nef_emulator-backend-1        |     result = await app(self.scope, self.receive, self.send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in call
nef_emulator-backend-1        |     return await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 269, in call
nef_emulator-backend-1        |     await super().call(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 124, in call
nef_emulator-backend-1        |     await self.middleware_stack(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
nef_emulator-backend-1        |     await self.app(scope, receive, _send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 69, in call
nef_emulator-backend-1        |     await response(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 253, in call
nef_emulator-backend-1        |     async with anyio.create_task_group() as task_group:
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 662, in aexit
nef_emulator-backend-1        |     raise exceptions[0]
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 256, in wrap
nef_emulator-backend-1        |     await func()
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 245, in stream_response
nef_emulator-backend-1        |     async for chunk in self.body_iterator:
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 58, in body_stream
nef_emulator-backend-1        |     raise app_exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 36, in coro
nef_emulator-backend-1        |     await self.app(scope, request.receive, send_stream.send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 92, in call
nef_emulator-backend-1        |     await self.simple_response(scope, receive, send, request_headers=headers)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 147, in simple_response
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 93, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 82, in call
nef_emulator-backend-1        |     await self.app(scope, receive, sender)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
nef_emulator-backend-1        |     raise e
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 670, in call
nef_emulator-backend-1        |     await route.handle(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 418, in handle
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 269, in call
nef_emulator-backend-1        |     await super().call(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 124, in call
nef_emulator-backend-1        |     await self.middleware_stack(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
nef_emulator-backend-1        |     await self.app(scope, receive, _send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 93, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 82, in call
nef_emulator-backend-1        |     await self.app(scope, receive, sender)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
nef_emulator-backend-1        |     raise e
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 670, in call
nef_emulator-backend-1        |     await route.handle(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 266, in handle
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 65, in app
nef_emulator-backend-1        |     response = await func(request)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 227, in app
nef_emulator-backend-1        |     raw_response = await run_endpoint_function(
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 162, in run_endpoint_function
nef_emulator-backend-1        |     return await run_in_threadpool(dependant.call, **values)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
nef_emulator-backend-1        |     return await anyio.to_thread.run_sync(func, *args)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
nef_emulator-backend-1        |     return await get_asynclib().run_sync_in_worker_thread(
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
nef_emulator-backend-1        |     return await future
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
nef_emulator-backend-1        |     result = context.run(func, *args)
nef_emulator-backend-1        |   File "/app/./app/api/api_v1/endpoints/monitoringevent.py", line 180, in create_subscription
nef_emulator-backend-1        |     ccf_logs(http_request, json_response, "service_monitoring_event.json", token_payload.get("sub"))
nef_emulator-backend-1        | AttributeError: 'NoneType' object has no attribute 'get'
nef_emulator-backend-1        | ERROR:uvicorn.error:Exception in ASGI application
nef_emulator-backend-1        | Traceback (most recent call last):
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 372, in run_asgi
nef_emulator-backend-1        |     result = await app(self.scope, self.receive, self.send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 75, in call
nef_emulator-backend-1        |     return await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 269, in call
nef_emulator-backend-1        |     await super().call(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 124, in call
nef_emulator-backend-1        |     await self.middleware_stack(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
nef_emulator-backend-1        |     await self.app(scope, receive, _send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 69, in call
nef_emulator-backend-1        |     await response(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 253, in call
nef_emulator-backend-1        |     async with anyio.create_task_group() as task_group:
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 662, in aexit
nef_emulator-backend-1        |     raise exceptions[0]
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 256, in wrap
nef_emulator-backend-1        |     await func()
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/responses.py", line 245, in stream_response
nef_emulator-backend-1        |     async for chunk in self.body_iterator:
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 58, in body_stream
nef_emulator-backend-1        |     raise app_exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/base.py", line 36, in coro
nef_emulator-backend-1        |     await self.app(scope, request.receive, send_stream.send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 92, in call
nef_emulator-backend-1        |     await self.simple_response(scope, receive, send, request_headers=headers)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/cors.py", line 147, in simple_response
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 93, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 82, in call
nef_emulator-backend-1        |     await self.app(scope, receive, sender)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
nef_emulator-backend-1        |     raise e
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 670, in call
nef_emulator-backend-1        |     await route.handle(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 418, in handle
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/applications.py", line 269, in call
nef_emulator-backend-1        |     await super().call(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/applications.py", line 124, in call
nef_emulator-backend-1        |     await self.middleware_stack(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 184, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/middleware/errors.py", line 162, in call
nef_emulator-backend-1        |     await self.app(scope, receive, _send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 93, in call
nef_emulator-backend-1        |     raise exc
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/exceptions.py", line 82, in call
nef_emulator-backend-1        |     await self.app(scope, receive, sender)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
nef_emulator-backend-1        |     raise e
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 670, in call
nef_emulator-backend-1        |     await route.handle(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 266, in handle
nef_emulator-backend-1        |     await self.app(scope, receive, send)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/routing.py", line 65, in app
nef_emulator-backend-1        |     response = await func(request)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 227, in app
nef_emulator-backend-1        |     raw_response = await run_endpoint_function(
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/fastapi/routing.py", line 162, in run_endpoint_function
nef_emulator-backend-1        |     return await run_in_threadpool(dependant.call, **values)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
nef_emulator-backend-1        |     return await anyio.to_thread.run_sync(func, *args)
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
nef_emulator-backend-1        |     return await get_asynclib().run_sync_in_worker_thread(
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
nef_emulator-backend-1        |     return await future
nef_emulator-backend-1        |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
nef_emulator-backend-1        |     result = context.run(func, *args)
nef_emulator-backend-1        |   File "/app/./app/api/api_v1/endpoints/monitoringevent.py", line 180, in create_subscription
nef_emulator-backend-1        |     ccf_logs(http_request, json_response, "service_monitoring_event.json", token_payload.get("sub"))
nef_emulator-backend-1        | AttributeError: 'NoneType' object has no attribute 'get'

Hi @JFrgs,
There was a place where the code for handling the error was not added. I paste here a patch to fix the error. Can you merge it to main?
--- a/backend/app/app/api/api_v1/endpoints/monitoringevent.py
+++ b/backend/app/app/api/api_v1/endpoints/monitoringevent.py
@@ -180,6 +180,8 @@ def create_subscription(
             ccf_logs(http_request, json_response, "service_monitoring_event.json", token_payload.get("sub"))
         except TypeError as error:
             logging.error(f"Error: {error}")
+        except AttributeError as error:
+            logging.error(f"Error: {error}")

         return http_response
     elif (item_in.monitoringType == "LOSS_OF_CONNECTIVITY" or item_in.monitoringType == "UE_REACHABILITY") and item_in.maximumNumberOfReports == 1:
diff --git a/env-file-for-local.dev b/env-file-for-local.dev

BR
Daniel

This issue is resolved in the latest Release v2.2.1
Best,
Dimitris


Updated chapters psorted in wrong order

Steps to reproduce

Put novel in library
Wait for an update
Most updates are put in the wrong order

Expected behavior

Actual behavior

LNReader version
1.1.19
Android version
Android 14
Device
S6 light SM-P616
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] If this is an issue with a source, I should be opening an issue in the sources repository.
[X] I have updated the app to version 1.1.19.
[X] I will fill out all of the requested information in this form.

https://github.com/LNReader/lnreader/assets/159732472/8e3f9b08-e6c7-47e6-8136-f38956366e00

The current behaviour you're experiencing is expected, as each new chapter is inserted at the end. If the source adds or updates an older chapter later, it will indeed appear at the end. To address this in the beta version, we could implement a sorting option based on chapter numbers, provided the source website includes them.

Fixed in v2 app by using chapter fetched order instead of id