Build JavaScript files during python package build

Make package builds via setuptools automatically trigger building of
merged & minified JS assets.
This fixes installing isso from source when using pip install as long
as both the python and node requirements are met. It also ensures that
setup.py commands like build or bdist_wheel create archives that
contain generated JS code.

That feels a bit too magic to me? Maybe just warn if the minified js files are not found.

I wouldn't know what part should warn about these files missing.
Since this step is required for building a working redistributable package (may it be a wheel or just a tarball) this looks like a good place to me. It also makes it obvious that you will need npm if you use pip install on the github URL instead of failing more or less silently in the browser because the required files are missing.
The idea for this was actually taken from the readthedocs sphinx theme:
https://github.com/readthedocs/sphinx_rtd_theme/blob/master/setup.py#L16

Again, just my personal preference. I can see that your approach would solve a lot of annoying newbie issues.
The primary reason for people to install from source is because the isso package in pypi has historically been outdated or even broken (werkzeug==1.0) for long stretches of time.
People installing directly via pip install git+https://github.com/posativ/isso would need to have node+npm installed already, which might be non-obvious. I'd also wager that these people don't really want to install all this js ecosystem stuff just to get an updated package.
My favourite way to resolve this whole issue would be to keep minified versions of the js assets in this repo, but sadly that might break the make-based change detection.

(I guess your approach wouldn't affect FTBFS issues since you'd invoke the make commands in the "prepare" stage anyway, and not use python to generate the minified js assets?)

I've created https://github.com/posativ/isso/pull/703 to clarify more issues that might pop up when installing from source.
But I'm growing more and more partial to your approach, considering e.g. the experience of users in https://github.com/posativ/isso/issues/656.

Rebased and applied the check_call() suggestion.
Sorry for the long delay, work and health kept me busy lately.

Note that packages created by python3 setup.py sdist and installed via pip will attempt to run the NpmBuildCommand.
A way to specify that the command is only to be run when installing from source is needed.

Feel free to revert, I don't need it myself and I don't intend to dive any further into the sorry state of python packaging

Let's revert.


Refactor components/Table

This is a big one - will be worth splitting this into multiple smaller issues later

Split into smaller files.

Move to server-side pagination/ filtering/ sorting

This will need to be done last - so that this can be implemented in the backend first.

@IsmailM can you split this into smaller issues please and tie to milestones


React 15 unitless number warning

Seems like React 15 is thowing an warning if you don't add a unit to the height style.
warning.js:44 Warning: a `div` tag (owner: `PanelContainer`) was passed a numeric string value for CSS property `height` (value: `0.0000`) which will be treated as a unitless number in a future version of React.

I guess we should just add px by default to the style but maybe it needs to be customisable to other units?

Should just need parseInt or + operator since React still allows unitless numbers just not as strings I believe. I'll cut a new release with this fixed soon. Thanks for letting me know.

Great thanks!
On 12 April 2016 at 19:39, Travis Arnold<EMAIL_ADDRESS>wrote:

Should just need parseInt or + operator since React still allows unitless
numbers just not as strings I believe. I'll cut a new release with this
fixed soon. Thanks for letting me know.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/souporserious/react-motion-ui-pack/issues/46#issuecomment-208817658

Fixed in the latest release :) https://github.com/souporserious/react-motion-ui-pack/commit/5dd44815677b12da975b2e564bc591c19e5e484b


Update angular to latest version of 16 and tauri to 1.5.3

Description
Users may have to update their global angular cli by running the following command:
npm install -g @angular/cli@^16
The commands used to update the project were as follows:
cd ./scr-tauri
cargo update
cd ../
ng update @angular/core@16 @angular/cli@16 @angular-eslint/schematics@16
The following page was referenced for the angular migration:
https://update.angular.io/?v=15.0-16.0
Type of change
Update to newer versions of angular and tauri

[x] New feature (non-breaking change which adds functionality)
[x] This change requires a documentation update

Checklist:

[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have run tests (npm run test) that prove my fix is effective or that my feature works

Tests Run:
npm run test
npm run web:serve
npm run web:prod
npm run tauri:bundle - I verified that the bundled app worked as expected by running the built .exe and the .msi
Extra Info:
I have also put a PR out on awesome-tauri, to include your template as a reference for bootstrapping with angular.
They already have an angular template, but in my opinion is is not as good as this one.
https://github.com/tauri-apps/awesome-tauri/pull/243

Thanks !


Performance on other dastasets

Thanks for your great work!
I have noticed that this paper focus on lane detection, which can be viewed as a single class semantic segmentation problem. So my question is that have you tried your method on classes in other datasets, like car or pedestrain class in CityScapes? Does this method improve their performance? Thanks!

I have also applied SAD to PSPNet and obtain around 0.6 point performance gains. Besides, using both labels and attention maps of deep layers as distillation targets can further enhance the final performance.

obtain around 0.6 point performance gains
Which class did you mean?

The overall mIoU.


Added jclouds examples for Poppy Flavor API

Disregard this PR. Not sure what happened here... Submitting another PR once API is completed.


SVG animation by percentage

Hi,
could this library show animation between two svg file with percentage?
ex: when i set 50%, the animation from first svg to second svg is half, not whole?
is that possible?

Unfortunately not yet. Current morphing animation is based on the native morphing, so need to check, if it's possible natively then we can add such an API as well.

Thank you very much!
Hope that will be possible :)


ngReact becomes an Angular to React conversion tool

I see there is discussion for ngReact in Angular2, but I'm not too excited about what Angular2 has to offer.  I have been persuaded to think that React is a better solution than Angular.  This is more a of a discussion than and issue.  But it would be great to have a tool that will allow for incremental changes of an Angular app to React.  There would be a lot of package choices to make, i.e. react router, data handler, etc..  But I think a lot of people would want to get out of the Angular eco system.

@MRHarrison a similar discussion happen on #140, was that also what you are looking for ?

Yeah, thanks!
On Fri, Feb 19, 2016 at 11:52 AM Kasper Bøgebjerg Pedersen <
<EMAIL_ADDRESS>wrote:

@MRHarrison https://github.com/MRHarrison a similar discussion happen
on #140 https://github.com/ngReact/ngReact/issues/140, was that also
what you are looking for ?
—
Reply to this email directly or view it on GitHub
https://github.com/ngReact/ngReact/issues/136#issuecomment-186300185.


Fixed : not tested

waiting for the test result.

The actual issue is different. closing this pull req.


Random issue only appearing on a specific server.

So first, I am using EssentialsX (latest from today) latest vault and latest luckperms on minecraft 1.12.2. First issue was my chat wasn't getting formatted on this specific server with essentialsx, except the prefix and suffix appeared. Second, I started removing some plugins to see if something was overriding EssentialsX Chat's formatter. Then this happened
https://pastebin.com/4QzCaymv
I have no idea why this happens on this specific server. All other servers with the same config and same versions of EssentialsX, Vault and LuckPerms.

Can you make sure that the db-file could be created?
The name of the file should be luckperms-h2.mv.db and should be inside the luckperms-folder

Yes, it is there.

I noticed my config got reset so I changed it back to MySQL and this happens (Not that's it's much difference) https://pastebin.com/0M3KhN8V

Have you updated any other plugins recently?
It seems like one of them is doing some odd things with the new command stuff in 1.13.

No it's all 1.12 paper

So you have no plugins other than LuckPerms?
The version your server is running is irrelevant to my question.

and forgot to answer your question, yes essentials chatcontrol and other plugins that were messing my chat formatting (atleast I thought)

I have about 60 more plugins, if you wish to see the list lemme know

Can you try removing ChatControl to see if the issue goes away?

Same error ;-;

What freaks me out is that other servers have the exact same plugins I mentioned earlier with same configs and they work just fine. So I'm not sure if it's another plugin or something else I don't understand

Please try using this build of LuckPerms, and show me any errors you get.
https://transfer.sh/cfSeD/LuckPerms-Bukkit-4.2.82.jar

https://pastebin.com/pVmF4V5E

Resolved <3 Thanks :)


[IntelliJ Plugin] Fix random error when splitting strings

Purpose
Fixes #20477.
Check List

[x] Read the Contributing Guide
[ ] Updated Change Log
[x] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Codecov Report

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

@@           Coverage Diff           @@
##           master   #20528   +/-   ##
=======================================
  Coverage   15.21%   15.21%
=======================================
  Files          50       50
  Lines        1341     1341
  Branches      208      208
=======================================
  Hits          204      204
  Misses       1121     1121
  Partials       16       16

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 4791b04...852e6cb. Read the comment docs.

Thanks @Shan1024.


./scripts/populate-instance.sh error messages

Hi all!
Today it is the first time I try to install invenio by this installation guide: http://invenio.readthedocs.io/en/latest/installation/installation-detailed.html
I installed Centos 7 for this. For an automated unattended way i used the scripts.
When I tried to execute this script ./scripts/populate-instance.sh , I got this error messages:

./scripts/populate-instance.sh: line 94: : No such file or directory
./scripts/populate-instance.sh: line 97: workon: command not found
./scripts/populate-instance.sh: line 104: ip-xx-xx-xx-xx: command not found

However, I went on without fixing this issues because I did not know how. I tried to create a new instance (see chapter <IP_ADDRESS>.) but for me it was not clear why this error message appers:

bash: mkvirtualenv: command not found

Do I have to open a phyton command line or something else? I have no experience in phyton. I think the installation instructions should be clearer and also understandable for newbies like me. And maybe it is possible to create a master script for single maschine installations which executes the other scripts in one go.
Thanks a lot and have a nice day!

It looks to me that you are missing virtualenv and virtualenvwrapper, the first time you install virtualenvwrapper you might need to create a new bash session and/or reload the ~/.bashrc file, from the guide (http://invenio.readthedocs.io/en/latest/installation/installation-detailed.html#web):
    $ sudo pip install -U virtualenvwrapper setuptools pip
    if ! grep -q virtualenvwrapper ~/.bashrc; then
        mkdir -p "$HOME/.virtualenvs"
        echo "export WORKON_HOME=$HOME/.virtualenvs" >> "$HOME/.bashrc"
        echo "source $(which virtualenvwrapper.sh)" >> "$HOME/.bashrc"
    fi
    export WORKON_HOME=$HOME/.virtualenvs
    source "$(which virtualenvwrapper.sh)"

Thank you very, very much!
Because I used the scripts I didn´t had a closer look on what they did (or tried to do). Also the docu said: "Let’s see in detail what the web provisioning script does." For me it sounds that I don´t have do the following steps because the script does.
However, after reading your post I had a closer on that steps and I found out that beside virtualenv and virtualenvwrapper also the Nginx web server were not installed.
After all there are two error message left.
Error message 1 after running the populate-instance.sh-Script:

./scripts/populate-instance.sh:  line 104: ip-xx-xx-xx-xx: command not found

Error message 2 in the ./scripts/create-instance.sh-Script:

#include <openssl/opensslv.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1

Failed building wheel for cryptography
Running setup.py clean for cryptography
Failed to build cryptography

[...]
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------

Command "/root/.virtualenvs/localhost/bin/python2 -u -c "import setuptools, tokenize;file='/tmp/pip-build-_JBa4N/cryptography/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-X5KgHo-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.virtualenvs/localhost/include/site/python2.7/cryptography" failed with error code 1 in /tmp/pip-build-_JBa4N/cryptography/

GCC and openssl are installed.
Now I will try to install the system without using the scripts. Maybe they are not up to date and work not well with the current version of centOS. I don´t know, maybe thats the problem.
However, thank you very much again. My issue is not complety fixed but should we close this thread or might it be helpful if we keep it as an open issue?

Glad to hear I could help, even if it was just a bit.
About the remainding errors, for the first one, it looks like an environment variable is wrong, empty or there's some 'template examples' not replaced somewhere. You can try running the script with 'bash -x /path/to/script' to get a more verbose output.
About the second, it seems like you are missing some headers for openssl, make sure that you have openssl-devel (and similar) packages installed, if that is the issue, it should be added to the docs imo.
About the docs themselves, there's an ongoing sprint on creating how-tos and docs for invenio right now. I'm not really involved, maybe one of the @inveniosoftware/admins want to comment on it.

Yep, we're writing up a complete set of tutorials for the upcoming Invenio User Group Workshop (March 21-24). Also, we're trying to polish the initial experience with Invenio so that it becomes as easy as possible and you won't hit errors like the one above. We hope the tutorials hit the documentation in March/April. Stay tuned.

@david-caro Thanks! openssl-devel was also missing.
To sum up these packages were missing after using only the scripts (under CentOS 7.3):

openssl-devel
openssl
gcc
virtualenv (see post of @david-caro )
virtualenvwrapper (see post of @david-caro )
Nginx web server

I guess because of my tries / tests with the scripts I get this error message now when I try to execute the ./scripts/create-instance.sh-Script:

cookiecutter.exceptions.OutputDirExistsException: Error: "ip-xx-xx-xx-xx" directory already exists.

Probably I should start with a fresh new install. However thank you very much for your help. Looking to the new documentation in March/April 2017. Hopefully the scripts are updated then, too.
Last but not least: Thanks again!

@Quantentunnel Some of the dependencies like gcc or nginx should have been installed for you by the provisioning scripts at the time...was there any error? Other dependencies like openssl-devel were indeed missing. Anyway we have fixed all the CentOS7 installation issues yesterday, so everything should be  working out of the box again.  Please just use the latest master branch:
$ git clone https://github.com/inveniosoftware/invenio
$ cd invenio/
$ sed -i 's,ubuntu/trusty64,centos/7,g' Vagrantfile
$ vagrant up
$ vagrant ssh web -c 'source .inveniorc && /vagrant/scripts/create-instance.sh'
$ vagrant ssh web -c 'source .inveniorc && /vagrant/scripts/populate-instance.sh'
$ vagrant ssh web -c 'source .inveniorc && nohup /vagrant/scripts/start-instance.sh'
$ firefox http://<IP_ADDRESS>/records/1


register the package

@JuliaRegistrator register()

Registration pull request created: JuliaRegistries/General/89150
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.0.1 -m "<description of version>" 2bb10fa355af0f3d7258fd3104ffa9e499b55d68
git push origin v0.0.1

@JuliaRegistrator register()

@JuliaRegistrator register()

Registration pull request updated: JuliaRegistries/General/89150
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.0.1 -m "<description of version>" 2a8cec0be1d60753a5b5e3c2c455e17b84e18406
git push origin v0.0.1

@JuliaRegistrator register()

Registration pull request updated: JuliaRegistries/General/89150
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.0.1 -m "<description of version>" 2a8cec0be1d60753a5b5e3c2c455e17b84e18406
git push origin v0.0.1

@JuliaRegistrator register()

Registration pull request updated: JuliaRegistries/General/89150
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.0.1 -m "<description of version>" 19099e8fe549b8e7a7572d0b07954d03771a0927
git push origin v0.0.1


HDDS-7197. Schema V3 RocksDB instance statitics register as metrics collision

https://issues.apache.org/jira/browse/HDDS-7197
It uses rocksdb directory name as the jmx bean name.   For Schema V2,  every rocksdb directory like this,
999998-dn-container.db
999999-dn-container.db
While in Schema V3, all rocksdb has the same directory name "container.db".  Collision happens when rocksdb per disk volume come to  register its metrics to jmx with failure "already exists!" metrics exception.
This patch add the disk storage UUID as prefix of bean name. So now the bean name for each Schema V3 rocksdb instance will be storageUUID-container.db, here is an example,
DS-d26aea2d-cc3b-42e4-b574-b4644227fa8-ccontainer.db

The failed TestDecommissionAndMaintenance is irrelevant. It is passed locally.

Thanks @guihecheng for the code review.


Feature fix memleak 2

#387

https://github.com/TeamWisp/WispRenderer/pull/390 but without git's problematic diffing.


add erlang 19, 20 for test

@zmstone  The reason why test failed seems to be the network, and in the session make t fail.

@getong I'm for not to introduce compile flags for this fix.
as {platform_define, "^(17|18|19)", old_rand_uniform} this is only for rebar,
we'll otherwise have to do similar for erlang.mk
(brod supports builds for rebar rebar3 and erlang.mk)
This only affects test code (to randomize a partition number).
It's fine to have some less random-ish numbers for this case.
e.g. rand(Max) -> {_, _, Micro} = os:timestamp(), Micro rem Max.

@zmstone  I will modify the code as you suggested.


Bulk Link creation and links expire on a certain number of clicks

Implemented bulk link creation and link expiry based on predefined clicks

Changes were fixed in setup_proj branch, will be merged along with Tags


feat: convert heading challenge test to Playwright

Checklist:

[x] I have read and followed the contribution guidelines.
[x] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #XXXXX

I am going to block this one as #54897 does the same thing


Fix SpikeRule

Description
Fix SpikeRule
https://github.com/jertel/elastalert2/discussions/796

Checklist

[x] I have reviewed the contributing guidelines.
[ ] I have included unit tests for my changes or additions.
[x] I have successfully run make test-docker with my changes.
[ ] I have manually tested all relevant modes of the change in this PR.
[ ] I have updated the documentation.
[x] I have updated the changelog.

Questions or Comments

The job will be dropped in a location unrelated to this fix. It seems that it happened to fall
Collecting cffi>=1.15.0
  Downloading cffi-1.15.0-cp[310](https://github.com/jertel/elastalert2/pull/804/checks#step:3:310)-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (446 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 446.3/446.3 KB 17.7 MB/s eta 0:00:00
ERROR: Could not find a version that satisfies the requirement croniter>=1.2.0 (from versions: 0.1.4.macosx-10.5-i386, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.2.0, 0.2.2, 0.2.4, 0.2.5, 0.2.7, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.3.10, 0.3.11, 0.3.12, 0.3.13, 0.3.14, 0.3.15, 0.3.16, 0.3.17, 0.3.18, 0.3.19, 0.3.20, 0.3.22, 0.3.23, 0.3.24, 0.3.25, 0.3.28, 0.3.29, 0.3.30, 0.3.31, 0.3.32, 0.3.33, 0.3.34, 0.3.35, 0.3.36, 0.3.37, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.0.10, 1.0.11, 1.0.12, 1.0.13.dev0, 1.0.13, 1.0.14, 1.0.15, 1.1.0)
ERROR: No matching distribution found for croniter>=1.2.0
The command '/bin/sh -c pip3 install -r requirements-dev.txt' returned a non-zero code: 1
Service 'tox' failed to build : Build failed
make: *** [Makefile:23: test-docker] Error 1

Error: Process completed with exit code 2.


WIP: Add Cliquet option (#443)

[ ] Add test -- e.g. start=maturity, start=0

Codecov Report

Merging #498 (4236cf5) into main (6d3c8a5) will decrease coverage by 0.53%.
The diff coverage is 67.74%.

@@            Coverage Diff             @@
##             main     #498      +/-   ##
==========================================
- Coverage   99.55%   99.01%   -0.54%
==========================================
  Files          49       50       +1
  Lines        1803     1834      +31
==========================================
+ Hits         1795     1816      +21
- Misses          8       18      +10

Impacted Files
Coverage Δ

pfhedge/nn/functional.py
99.09% <50.00%> (-0.91%)
:arrow_down:

pfhedge/instruments/derivative/cliquet.py
67.85% <67.85%> (ø)

pfhedge/instruments/__init__.py
100.00% <100.00%> (ø)

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 6d3c8a5...4236cf5. Read the comment docs.


Also rewrite trivial array expressions

Simple non-nested array expressions need to be rewritten in order to enable scalar optimizations on them.  For example, this PR speeds up x ** 3 on arrays by 100x.

[Current coverage][cc-pull] is 87.26%

Merging [#1985][cc-pull] into [master][cc-base-branch] will decrease coverage by <.01%

@@             master      #1985   diff @@
==========================================
  Files           303        303
  Lines         53992      54062    +70
  Methods           0          0
  Messages          0          0
  Branches       5576       5579     +3
==========================================
+ Hits          47123      47179    +56
- Misses         5950       5960    +10
- Partials        919        923     +4

Powered by Codecov. Last updated by [b8eed30...6990217][cc-compare]
[cc-base-branch]: https://codecov.io/gh/numba/numba/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/numba/numba/compare/b8eed30b6cc561631dfcc021c52c77230287654a...6990217b6f05fbf5d56aa60419507a1ab1258fe4?src=pr
[cc-pull]: https://codecov.io/gh/numba/numba/pull/1985?src=pr


Dexie Sync: All databases getting synced on using Dexie.Syncable

I have two databases one is to be synced to a server (using WebSocket Sync) and the other is a local db for storing temporary changes and other things that I refer on the client. But both the databases are synced when I use Dexie Syncable.
Here is a sample code:
`    var db1 = new Dexie("MySyncedDB");
db1.version(1).stores({
    friends: "$$oid,name,shoeSize",
    pets: "$$oid,name,kind"
});

db1.syncable.connect ("websocket", "wss://dexie-test-kspuhazh.c9users.io");
db1.syncable.on('statusChanged', function (newStatus, url) {
    console.log ("Sync Status changed: " + Dexie.Syncable.StatusTexts[newStatus]);
});

var db2 = new Dexie("MyLocalDB");

db2.version(1).stores({
    friends: "$$oid,name,shoeSize",
    pets: "$$oid,name,kind"
});`

Expected behaviour is only the MySyncedDB is expected to be synced, but I see both the databases getting synced.
Example on this link.  You could see the sync related tables  (_changes, _intercomm, etc.,) created on client side for both the databases.
How can I have an un-synced local database when I use Dexie Syncable?

The changes are not synced, those collections are created by Dexie.Observable on all databases even though sync is not used on them. The local DB (db2) is not getting synced.

As you noted Dexie.Observable adds those tables to all databases. There is currently no way to exclude a database from Dexie.Observable/Dexie.Syncable. I'm pretty sure that Dexie.Observable will be active for both databases but not Dexie.Syncable as it is bound to a specific database instance (the one you call db.connect() on). When Dexie.Observable is active and you have multiple open tabs which are running the same databases, then changes in one tab will propagate to the other one.
If you have stores that should not be observed by Dexie.Observable, you can use _ or $ in front of their names.

You can also use the option {addons: []} to Dexie constructor to inactivate addons for specific databases.
https://github.com/dfahlander/Dexie.js/wiki/Dexie#options
var plainDB = new Dexie ('dbname', {addons:[]}) ;

Totally forgot about that option. Maybe Dexie should per default use {addons: []} and have the user explicitly request the addons he/she wants to use. This part also confused me when I started using Dexie and went into the code to see which addons are actually activated by default when addons is not defined explicitly.

Thought it might be nice to see addons as optional built-ins. But we lack a way to include then without applying them by default.
import dexieSyncableAddon from 'dexie-syncable/addon';

In contrast to just
import 'dexie-syncable';

My suggestion would be that the first one includes the addon and pushes it to Dexie.addons while the other just returns the addon without activating it.
Sync-client should use the second one if so since it extends Dexie and doesn't want to change the behavior for users including Dexie side by side with  Sync-client.
In essence, addons (unlike plugins) would be seen as optional native behavior. That would justify the side effect.
But I am open for a discussion about this. I don't want people to get confused. I might be on the wrong path so please enlighten me if so :)

Generally speaking I'm not a big fan of side effects. That being said, I do see the advantage of autoincluding addons implicitly by just importing the addon. I think what confused me was that there are two ways to define addons. Implicitly and globally by importing the addon and explicitly by using the addons array which is bound to a instance of Dexie.
I think having both ways to include an addon makes it unnecessarily complex/confusing. A further issue would be that an addon developer might not allow the implicit/global addon inclusion which would make the addons interface inconsistent and more complex for Dexie users.
I personally like passing addons as functions and registering explicitly and not implicitly. And in Dexie's case the addons would always be instance bound. But I'm also not against having two ES imports, one for globally adding an addon by automatically pushing to Dexie.addons and one for getting a function to use for the addons of an instance (or to be used by the user to push to Dexie.addons). An extra import for the global addons would make things more explicitly.

@nponiros I see. And I agree with you. The focus then is the documentation. There must be a clear documentation on how to include the addons. Current docs sais import 'dexie-syncable' to activate it. A clearer behaviour (and API change) would be something like this:
import Dexie from 'dexie';
import dexieObservable from 'dexie-observable';
import dexieSyncable from 'dexie-syncable';

const db = new Dexie ('dbname', {addons: [dexieObservable, dexieSyncable]});

To apply an addon by default on future Dexie instances:
Dexie.addons.push(dexieObservable);
Dexie.addons.push(dexieSyncable);

const db = new Dexie('dbname'); // Will get the addons without explicit addons option.

A shortcut for calling Dexie.addons.push() is to:
import Dexie from 'dexie';
import 'dexie-observable/apply-global';
import 'dexie-syncable/apply-global';

const db = new Dexie('dbname');

Thoughts?

@dfahlander I like it. I think this is the way to go. We should contact other addon maintainers to see if they are willing to implement this change so we can have a consistent addons interface.
Dexie-relationships can not be applied globally from what I can tell and dexie-mongoify can only be applied globally.
@ignasbernotas @YurySolovyov any thoughts on the comment above regarding addon inclusion?

I like the idea, but won't be able to update mongoify right away

@YurySolovyov if we go this way I can create a PR for you which you can release when dexie is released with the change

I'll take a look at PR if you submit one.

I definitely agree, I'm more of a fan of explicitly defining things and consistency between addons is a must. It's a go from me. Let me know when you'd need this:)

Think we will need to overlook the d.ts files as they now act as if the api is extended when including the addon

Hmm maybe the addons could return an object and dexie could extend itself with that object. In the d.ts we could just define the addon function and the returned object. I'm not really sure if what I'm suggesting will work but it's an idea. I think typescript would work even without changes but autocompletion will probably offer methods which might not exist.I believe that this is a general issue when objects are extended..
The better solution would probably be to write the addons (at least the ones with a d.ts) in typescript and remove the declarations.


rack1 gemfile fails in tests

https://github.com/socketry/falcon/pull/124/checks?check_run_id=906495785

Bundler could not find compatible versions for gem "rack":
In rack1.gemfile:
rack (~> 1.0)
utopia-project was resolved to 0.13.3, which depends on
  utopia (~> 2.14) was resolved to 2.18.0, which depends on
    rack (~> 2.2)

Yes.
It looks like optional groups still fail even if not actually used.

https://github.com/rubygems/rubygems/issues/3730
https://github.com/rubygems/rubygems/issues/3837

Not sure what the solution is here. bundler tries to resolve it regardless of whether it's being used or not.

Super!


fix: typo

Manually creating a particle using Emitter::createParticle incorrectly ignores passed-in behaviors due to a typo.

It's true that I found this problem in refactoring. Thank you


Parser clean up: no longer transform multi-node CASE and NULLIF in the transformer

Previously a CASE statement with multiple WHEN ... THEN ... nodes would be transformed into a chain of case statements in the transformer. In this PR we modify the case so that this step is only performed during binding. The case statement now looks like this after the transformer phase:
struct CaseCheck {
	unique_ptr<ParsedExpression> when_expr;
	unique_ptr<ParsedExpression> then_expr;
};

//! The CaseExpression represents a CASE expression in the query
class CaseExpression : public ParsedExpression {
	vector<CaseCheck> case_checks;
	unique_ptr<ParsedExpression> else_expr;
};

NULLIF(a, b) used to be transformed into CASE WHEN a=b THEN NULL ELSE a in the transformer phase. In this PR I have changed this to instead be transformed to a regular function call nullif(a, b) and have created a macro that does this transformation during binding instead.

Ha I think I may have been responsible for those in the first place. All that hard work 😭. Great this is cleaned up!

Ha I think I may have been responsible for those in the first place. All that hard work 😭. Great this is cleaned up!


Deadline Exceeded error!

[REQUIRED] Step 2: Describe your environment

Operating System version: Ubuntu 16
Firebase SDK version: v6
Firebase Product: Firestore

[REQUIRED] Step 3: Describe the problem
I am doing a basic Add to Firestore through Node Admin SDK. I just add a object to a document and then wait for the document ID to return after that I send it to the front end to be subscribed for realtime updates. But sometimes I receive the error while adding a document and also updating as to Deadline Exceeded
Steps to reproduce:
The code that I have added to my backend.
let ref = db.collection("orders");

return new Promise((resolve, reject) => {
            ref.add(order).then((order) => {
                logger.info(order);
                resolve(order);
            }).catch((err) => {
                logger.info(err);
                reject(err);
            })
})

There you go I receive errors at catch.
Also checked my account I don't see any high usage since it is in development phase so hardly adding 10-20 docs on a normal day.
Can you please help here. Thanks

Hi @warlockdn! Sorry to hear that you are having connection issues to Firestore. Note that the initial connection attempt can sometimes be slow, as there is a lot of overhead (Channel establishment, SSL handshakes, authentication). Once you have a connection to Cloud Firestore, the underlying channel will get re-used for further operations. You may be able to work around your issue if you start by issuing a DocumentReference.get() call. We retry those automatically if the connection establishment takes a bit longer than it should.

Hi @schmidt-sebastian sorry I don't quite understand. On application restart I already created a connection to firebase. But anyways can you guide me to a resource where I can see some demo or sample code as to why and how this can be used. ?

As said, this is not a solution, but rather a workaround:
const docRef = db.collection("orders").doc();
await docRef.get(); // This will retry on DEADLINE_EXCEEDED
// Now the channel is established.
docRef.create({...}):

Do u have a permanent solution to this ? I don't know if with this I can go into production ? If I have to wait to retry on things. Coz the point of being realtime will be of no use if on a load i receive these errors. Or may be i need to follow some other process ?

If you continue to run into these issues, then we should look at your network stack and how you connect to our data centers. If we do need to go down that route, we can let you know the environment variables that will help us debug.

Yea you can help me then lemme know what needs to be done so that I don't end up embarrassing my product haha. Thanks

Please set the following environment variables:
GRPC_TRACE=all
GRPC_VERBOSITY=DEBUG

??

Sorry, I am just catching up on my emails. You only need to initialize the client connection only once, and the network channel should stay open.

So what's the issue with the time out then ? My internet connectivity is
pretty good
On Wed, Sep 19, 2018, 12:23 AM Sebastian Schmidt<EMAIL_ADDRESS>wrote:

Sorry, I am just catching up on my emails. You only need to initialize the
client connection only once, and the network channel should stay open.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-admin-node/issues/349#issuecomment-422506974,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADR8XkgdpookRGwgcuh3JlynA0OnFEDmks5ucUEygaJpZM4WYWqy
.

Just to confirm, you are getting most of these errors on the initial document write and before you are using any other Firestore operations? I am suggesting that your initial operation should be a document read, which we will retry. The "time to first byte" from Firestore is not necessarily related to your network connection.

I get this as well. I have a collection with about 300k documents on it and simply calling .get() on that collection will result in the timeout. Its a firebase problem and not your local system.
I've seen this happen in hosted cloud functions, and the fix is to increase the timeout limit in the function details (max time is 540 seconds, default is 60 seconds). However in the node sdk I can't get figure out how to extends the default past the 60 second limit.

@CapitanRedBeard & @farhankhwaja while I don't know if this will help you, still I was running into the same Deadline exceeded errors with only less than 2k of records! I have implemented this into all of my cloud functions, hopefully, this will help you too:
/**
* Set timeout and memory allocation
* In some cases, your functions may have special requirements for a long timeout value or a large * allocation of memory.
*You can set these values either in the Google Cloud Console or in the function source code (Firebase only).
*/
const runtimeOpts = {
  timeoutSeconds: 540, // 9 minutes
  memory: '2GB'
}
/**
 * When a csv file is uploaded in the Storage bucket it is parsed automatically using
 * PapaParse.
 */
exports.covertToJSON = functions
  .runWith(runtimeOpts) // <== apply timeout and memory limit here!
  .storage
  .object()
  .onFinalize( object => {
[...]

Sadly I can't remember where I found that snippet but as I said, every little bit helps!
Jon

So why is this happening? what is the limit that is being exceeded here? It is on blaze plan so this should not happen. Instead firebase should let us query as much as we want..
Kindly specify the technical issue that needs to be overcome to resolve this.

We currently configure a 60 second deadline for the RunQuery call (which both Query.get() and Query.stream() use). We believe that this should fit most use cases, and would like to refrain from increasing this deadline. Having a shorter deadline limits the amount of work that the backend does for clients that are no longer interested in a Queries' result, which generally results in fewer billed reads.
While somewhat convoluted, you can configure a different deadline for your client:
 const firestore = new Firestore({
      clientConfig: {
        interfaces: {
          'google.firestore.v1.Firestore': {
              methods: {
                RunQuery: {
                  timeout_millis: YOUR_NUMBER_HERE
                }
              }
            }
          }
        }
      });

We currently configure a 60 second deadline for the RunQuery call (which both Query.get() and Query.stream() use). We believe that this should fit most use cases, and would like to refrain from increasing this deadline. Having a shorter deadline limits the amount of work that the backend does for clients that are no longer interested in a Queries' result, which generally results in fewer billed reads.
While somewhat convoluted, you can configure a different deadline for your client:
 const firestore = new Firestore({
      clientConfig: {
        interfaces: {
          'google.firestore.v1.Firestore': {
              methods: {
                RunQuery: {
                  timeout_millis: YOUR_NUMBER_HERE
                }
              }
            }
          }
        }
      });

I'm getting these DEADLINE_EXCEEDED error when running tests using only very small sets of data (with "firebase-admin": "^7.0.0").   I'm also using the blaze plan so I don't think it's billing related.
It doesn't happen consistently either.  I run small tests and it feels like 50% of the time my query time out and runs into this error.
Is it possible a contention issue?  I have a number of parts to my app that may well be issuing queries and updates at the same time.

Can you do two things for me:

Do a blind write before this query to make the connection is established.
Share you Firestore logs (via setLogFunction())?

Thanks!

Hi - where can I find information about how to use setLogFunction?  Sorry, have search but can't see it

https://cloud.google.com/nodejs/docs/reference/firestore/0.8.x/Firestore#.setLogFunction
When using the Admin SDK:
admin.firestore.setLogFunction((log) => {
  console.log(log);
});

Thanks.  I'll add this, but the error isn't happening right now.  I suspect it's something to do with my app.  It's very "bursty" in terms of database updates.  Possibly I was testing while a burst of writes was happening and that was blocking my local node process?

OK, if this does come back, let us know.

I just got this error suddenly when running database.doc('orders/1234').set(data, { merge: true }).
Just happened one time so far.

If you can come up with something that reproduces this or if you can capture logs while this is happening we'll be able to look at it.
Note that there was a connection pooling bug addressed as part of #499. That bug would manifest in circumstances where there were many long-lived listeners running in the application.
If you start seeing this more often, try the fix we there (a new release containing the fix is imminent).

I'm getting this error a bit frequently. Stack trace on Sentry does not show where in my code this is happening. I'm assuming this is being emitted inside internals of firestore running in the background. Is there a way for me to determine what query is failing?

I have a few endpoints on my api that are timing out and am getting a 502 from cloudflare, while having no idea what's causing this behavior. It sounds from what I read here is the queries are just never resolving and these deadline exceptions are happening in the background?
Here is a stack trace from one of the errors Sentry caught for me:
  File "/build/node_modules/grpc/src/common.js", line 91, col 15, in Object.exports.createStatusError
    let error = new Error(message);
  File "/build/node_modules/grpc/src/client.js", line 233, col 26, in ClientReadableStream._emitStatusIfDone
    var error = common.createStatusError(status);
  File "/build/node_modules/grpc/src/client.js", line 211, col 8, in ClientReadableStream._receiveStatus
    this._emitStatusIfDone();
  File "/build/node_modules/grpc/src/client_interceptors.js", line 1272, col 15, in Object.onReceiveStatus
    emitter._receiveStatus(status);
  File "/build/node_modules/grpc/src/client_interceptors.js", line 568, col 42, in InterceptingListener._callNext
    return this.delegate[method_name](args_array[0], next_listener);
  File "/build/node_modules/grpc/src/client_interceptors.js", line 618, col 8, in InterceptingListener.onReceiveStatus
    this._callNext('onReceiveStatus', [status]);
  File "/build/node_modules/grpc/src/client_interceptors.js", line 1029, col 24, in null.<anonymous>
    first_listener.onReceiveStatus(response.status);```

I should not that my node logs show the following. These don't immediately precede the above error. Sometimes they're hours apart:
(node:17) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 drain listeners added. Use emitter.setMaxListeners() to increase limit

@rhyek Regarding the MaxListenersExceededWarning. This should be addressed by the latest release of grpc-js. If you re-install your modules, you should automatically get 0.4.3 of @grpc/grpc-js. In versions prior to 0.4.1, these warnings showed up especially when it took longer than normal to establish a GRPC channel.

I am on blaze plan and I have about 90K documents and when i do admin.firestore().collection(collectionName).doc(id).collection('xxxx').get().then(()=> { //do something })
in my firebase function i get Error: Deadline exceeded
Please not i am running my function with 2gb memory and 540 sec of timeout.

I am on blaze plan and I have about 90K documents and when i do admin.firestore().collection(collectionName).doc(id).collection('xxxx').get().then(()=> { //do something })
in my firebase function i get Error: Deadline exceeded
Please not i am running my function with 2gb memory and 540 sec of timeout.

Having the same issue when it comes to read and iterate over large collections (+100 docs)

We are preparing a release of @google-cloud/firestore v2.3.0 that will increase the timeout for all of our operations to 60s. This applies to all operations issued by the SDK, and is independent of the timeout set by any runtime environment (such as GCF). We hope that this alleviates some of the issues you are encountering.

I started an issue with the error details and some code. I hope you can help me to find out a solution, since it's a critical feature for our project.
https://github.com/firebase/firebase-functions/issues/556
Thanks a lot. @schmidt-sebastian

Hi,
I was testing my app with about 180k records and i was trying to generate csv from json. since firebase query throw this error after 60k records what i did is break my operation into multiple steps.
I wrote a recursive function which paginate and fetched only 50k in each call.
First query will be like
 db.collection('XXX').doc('id').collection('xxx').orderBy("createdAt").limit(50000);
Second query will be like
db.collection('XXXXX').doc('id').collection('XXXX').orderBy("createdAt").startAfter(lastRecord).limit(50000);
Please note createdAt was a field in my collection.
My firebase function took about 1.5 minute to complete this operation.

@schmidt-sebastian Still getting the same error after @google-cloud/firestore update to v2.3.0

@Sandeeprao69:  Even with 60s, you will likely not be able to read 60,000 documents. Your options are to split the query up using cursors (as shown in your comment) or to increase the deadline manually to suit your needs:
 const firestore = new Firestore({
      clientConfig: {
        interfaces: {
          'google.firestore.v1.Firestore': {
              methods: {
                RunQuery: {
                  timeout_millis: YOUR_NUMBER_HERE
                }
              }
            }
          }
        }
      });

@Sandeeprao69: Even with 60s, you will likely not be able to read 60,000 documents. Your options are to split the query up using cursors (as shown in your comment) or to increase the deadline manually to suit your needs:
 const firestore = new Firestore({
      clientConfig: {
        interfaces: {
          'google.firestore.v1.Firestore': {
              methods: {
                RunQuery: {
                  timeout_millis: YOUR_NUMBER_HERE
                }
              }
            }
          }
        }
      });

I was able to fetch 60k records in less than 60s actually in firebase cloud function.
I faced deadline exceeded error after 65k.

My workaround is to find a size that doesn't hit the DEADLINE ERROR, like 10k, then just loop by 10k increments and read for the database until you have read all your docs.
You can do something like this:
  const FOO_READ_LIMIT = 10000
  const foosRef = firestore.collection('foo');

  try {
    let isCalculating = true;
    let lastDoc = null;

    async.whilst(() => {
      return isCalculating;
    },
    async (next) => {
      const fooQuery = foosRef.limit(FOO_READ_LIMIT)
      const pagedFooQuery =
        lastDoc
          ? pagedFooQuery.startAfter(lastDoc)
          : pagedFooQuery

      const fooSnapshots = await pagedFooQuery.get();
      const size = fooSnapshots && fooSnapshots.size;

      if (size < FOO_READ_LIMIT) {
        isCalculating = false;
        next()
      }

      await doStuff(fooSnapshots);

      lastDoc = fooSnapshots.docs[FOO_READ_LIMIT - 1]
      next()
    },
    (error) => {
      console.log('All data is read');
    });
  } catch(e) {
	// Something wen wrong
  }

That is the best aproach I have found for getting thorugh this error

Still happening event with pagination

Stopped using firebase a while ago and this bug is one the main reasons (there were a few others). Had a really rough week in production where we had to re-architect a bunch of backend stuff as quickly as possible due to this issue and it's still not resolved.
Very interesting product, otherwise.

We are tracking this internally via bug ID 139021175.

@digvan / @rhyek: Can you send timestamps and project ID to mrschmidt(at)google.com? Thanks!

@schmidt-sebastian, sent you an email.

 const firestore = new Firestore({
      clientConfig: {
        interfaces: {
          'google.firestore.v1.Firestore': {
              methods: {
                RunQuery: {
                  timeout_millis: YOUR_NUMBER_HERE
                }
              }
            }
          }
        }
      });

I'm getting Error: 4 DEADLINE_EXCEEDED: Deadline exceeded
We're on the Blaze plan and I think we have something like 10000 records in a collection.
Seems like a possible solution is to increase the timeout value.
My code looks something like this..
    const snapshot = await admin
      .firestore()
      .collection('some-collection')
      .get();

Just not sure how to integrate the code snippet @schmidt-sebastian is using into my code.

If you are using the Admin SDK, you can set is as follows:
const firestore = admin.firestore();
firestore.settings({clientConfig: ...});
await firestore.collection('...').get();

FWIW, I was experiencing this error when using<EMAIL_ADDRESS>to write a little over 1k documents to Firestore in a cloud function, and what seemed to fix it for me was explicitly returning a promise that resolved when all my batch write operations were complete. Before I was using the async syntax and it wasn't liking that (even thought that still returns a Promise). Go figure.

We are in 2020 and I'm still getting the same error. I'm transfering a lot of data to cloud firestore. It's working at the beginning, then i start having some DEADLINE Exceeded error on some items that are being added

@voold Can you send timestamps and project ID to peiqinzhao(at)google.com? Thanks!

We are in 2020 and I'm still getting the same error. I'm transfering a lot of data to cloud firestore. It's working at the beginning, then i start having some DEADLINE Exceeded error on some items that are being added

Exactly. Still having this issue. its making me do away with real time sync and batch all my requests as i have to always restart my server to fix this. I hope i dont have this issue after doing this

We are in 2020 and I'm still getting the same error. I'm transfering a lot of data to cloud firestore. It's working at the beginning, then i start having some DEADLINE Exceeded error on some items that are being added

Exactly. Still having this issue. its making me do away with real time sync and batch all my requests as i have to always restart my server to fix this. I hope i dont have this issue after doing this

Hi @ramzauchenna Can you send timestamps, project ID and log error information to peiqinzhao(at)google.com? Thanks!

I've about 600 documents regularly queried via cloud-functions. I do get
DEADLINE_EXCEEDED errors often. The frequency of seeing this error has increased lately.
The version of packages I use in cloud-functions
"dependencies": {
    "firebase-admin": "~7.0.0",
    "firebase-functions": "^3.2.0",
}

Would upgrading the libraries make the situation any better? thanks
(cc @schmidt-sebastian @hbgxsm95)

@ashking I'm using
"firebase-admin": "~8.8.0",
"firebase-functions": "~3.3.0"
and still have this problem

I would like to clarify something that I personally wasn't aware of - increasing the request timeouts well past 60 seconds actually will not have the desired effect. 60 seconds is currently the maximum timeout supported on the backed, so the only other solution is to reduce your response size.

@pkwiatkowski0 , I made this error go away.
After a lot of testing and educated guesses on the code developed, here is what made the fix go away -
When the CF is triggered, we were calling a few async calls to perform some business operations. In one of the asynchronous call we had to fetch a few hundred records and that's the place where we were always getting DEADLINE_EXCEEDED errors. After having some console.time() around the documents fetch it was seen that block of code was taking about 100s of seconds to fetch a mere 200 records from the collection. Though the function execution time in total was <100ms. Strange. Strange. Strange...
We made the calls synchronous by having async/await and waited for the entire execution to complete before exiting the function. This greatly reduced the time it took to fetch 200 records from 100s of seconds to <1000ms. Post this we have not seen the DEADLINE_EXCEEDED anymore and code is stable. Hope this helps.
I guess the fire-and-forget nature of the code blocks in the CF puts the entire function on some throttle mode and degrades the performance.

cheers

I had the same error where I only was only reading and writing small amounts of records (not even a few hundred) per firestore get()/set(). Increasing timeout and memory did not help. I discovered for me the issue was I had too many operations happening in parallel as i was performing these operations nested within a for loop.
To resolve the error (similar to @ashking resolution) I updated my code to handle the firestore database operation callbacks using async/wait. I effectively removed any parallel firestore operations. This is working really well, and things happen quickly which is good as I was concerned I would then hit the timeout limit if things happens one at a time. But seems faster if anything.
Hope this helps anyone stuck on a similar issue.

@pkwiatkowski0 , I made this error go away.
After a lot of testing and educated guesses on the code developed, here is what made the fix go away -
When the CF is triggered, we were calling a few async calls to perform some business operations. In one of the asynchronous call we had to fetch a few hundred records and that's the place where we were always getting DEADLINE_EXCEEDED errors. After having some console.time() around the documents fetch it was seen that block of code was taking about 100s of seconds to fetch a mere 200 records from the collection. Though the function execution time in total was <100ms. Strange. Strange. Strange...
We made the calls synchronous by having async/await and waited for the entire execution to complete before exiting the function. This greatly reduced the time it took to fetch 200 records from 100s of seconds to <1000ms. Post this we have not seen the DEADLINE_EXCEEDED anymore and code is stable. Hope this helps.
I guess the fire-and-forget nature of the code blocks in the CF puts the entire function on some throttle mode and degrades the performance.

It's not working. Even I try it multiple times

@Yogeshkumar9291 , Can you isolate and share a sample snippet of your cloud function?

.limit(50000);

Hi , here i mentioned the code as per your suggestion. Still facing the same error
let collectionReference = db.collection('userdatabog');
collectionReference
.where("date", ">", "20200315")
.limit(500)
.get()
.then(snapshot => {
dataList = snapshot.docs.map((documentSnapshot) => {
console.log("Noti Data " + documentSnapshot.data())
return documentSnapshot.data();
});
console.log("DataList  " + JSON.stringify(dataList))
})

@Yogeshkumar9291 this is the exact issue I had. using .then I could not control the exit of the function before the promise completed succcessfully. I moved it to async/await structure to make sure that my functions don't exit before promises are resolved and that solved my issue. I suggest you give it a try.
let collectionReference = db.collection('userdatabog').where("date", ">", "20200315").limit(500)

const snapshot = await collectionReference.get()

const dataList = snapshot.docs.map((documentSnapshot) => {
    console.log("Noti Data " + documentSnapshot.data())
    return documentSnapshot.data();
});
console.log("DataList  " + JSON.stringify(dataList))

i have extended my timeout to 540sec, but yet i hit the deadline exceed issue about a min of the program run
here my CF snippet
const runtimeOpts = {
  timeoutSeconds: 540,
//   memory: '1GB'  --> deployment error if defined
}
...
export const GCPSpeech2TranscriptLRR = functions.runWith(runtimeOpts).https.onRequest((req, res) => {

    cors(req, res, async () => {

        const gcsUri = `${storageServer}/${req.body.data.fullPath}`

        const encoding = 'FLAC';
        const languageCode = 'ms-MY'

        const config = {
            encoding: encoding,
            languageCode: languageCode,
            audioChannelCount: 2, // hit 'Invalid audio channel count' if not specify
            enableAutomaticPunctuation: true, // https://cloud.google.com/speech-to-text/docs/automatic-punctuation
        };
        const audio = {
            uri: gcsUri,
        };
        const request = {
            audio: audio,
            config: config,
        };

        // Detects speech in the audio file
        const [operation] = await client.longRunningRecognize(request);
        const [response] = await operation.promise();

        // resolve src/index.ts:175:18 - error TS7006: Parameter 'result' implicitly has an 'any' type.
        const transcription = response.results
            .map((result:any) => result.alternatives[0].transcript)
            .join('\n');
        res.status(200).send({ data: { status: true, message: transcription } })
    })
})

error msg in Chrome Console
Subscriber.js:192 Error: deadline-exceeded
    at new HttpsErrorImpl (index.cjs.js:58)
    at index.cjs.js:373
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
    at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:503)
    at ZoneTask.invoke (zone.js:492)
    at timer (zone.js:3034)

i have extended my timeout to 540sec, but yet i hit the deadline exceed issue about a min of the program run
here my CF snippet
const runtimeOpts = {
  timeoutSeconds: 540,
//   memory: '1GB'  --> deployment error if defined
}
...
export const GCPSpeech2TranscriptLRR = functions.runWith(runtimeOpts).https.onRequest((req, res) => {

    cors(req, res, async () => {

        const gcsUri = `${storageServer}/${req.body.data.fullPath}`

        const encoding = 'FLAC';
        const languageCode = 'ms-MY'

        const config = {
            encoding: encoding,
            languageCode: languageCode,
            audioChannelCount: 2, // hit 'Invalid audio channel count' if not specify
            enableAutomaticPunctuation: true, // https://cloud.google.com/speech-to-text/docs/automatic-punctuation
        };
        const audio = {
            uri: gcsUri,
        };
        const request = {
            audio: audio,
            config: config,
        };

        // Detects speech in the audio file
        const [operation] = await client.longRunningRecognize(request);
        const [response] = await operation.promise();

        // resolve src/index.ts:175:18 - error TS7006: Parameter 'result' implicitly has an 'any' type.
        const transcription = response.results
            .map((result:any) => result.alternatives[0].transcript)
            .join('\n');
        res.status(200).send({ data: { status: true, message: transcription } })
    })
})

error msg in Chrome Console
Subscriber.js:192 Error: deadline-exceeded
    at new HttpsErrorImpl (index.cjs.js:58)
    at index.cjs.js:373
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
    at push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask (zone.js:503)
    at ZoneTask.invoke (zone.js:492)
    at timer (zone.js:3034)

Well at least I can fix your: deployment error if defined
// tslint:disable-next-line:no-duplicate-imports import { VALID_MEMORY_OPTIONS } from 'firebase-functions';
 memory: VALID_MEMORY_OPTIONS[3]

@Yogeshkumar9291 this is the exact issue I had. using .then I could not control the exit of the function before the promise completed succcessfully. I moved it to async/await structure to make sure that my functions don't exit before promises are resolved and that solved my issue. I suggest you give it a try.
let collectionReference = db.collection('userdatabog').where("date", ">", "20200315").limit(500)

const snapshot = await collectionReference.get()

const dataList = snapshot.docs.map((documentSnapshot) => {
    console.log("Noti Data " + documentSnapshot.data())
    return documentSnapshot.data();
});
console.log("DataList  " + JSON.stringify(dataList))

It isn't working..

i have Dough who from Firebase shared that i should call onCall instead of onRequest to use callable function
https://stackoverflow.com/questions/62587762/firebase-cloud-function-set-timeout-540s-but-ended-at-60s
But yet it still doesn't resolve my issue. Strange...

Same here August of 2020 and I'm getting the DEADLINE_EXCEEDED error.

Same error when saving a batch of 100 writes.

I have the same error when using firebase-admin in an Electron app + Vue 2.
My Firestore test collection has only 1 document with 1 field.
    const db = firebase.firestore()
    const ref = db.collection('countries');

    ref.get().then((res) => {
      console.log(res)
    })

The same code running in a standalone nodejs app runs fine, so in my case prob has to do with Electron.

You may be able to work around your issue if you start by issuing a DocumentReference.get() call. We retry those automatically if the connection establishment takes a bit longer than it should.

@schmidt-sebastian Could I issue a listCollections() command instead? Does that also get retried automatically? We are running on kubernetes, and I'm thinking I could use listCollections as a sort of ping, which I could use in the readiness check to make sure kubernetes does not send requests to the process before it completes. What do you think?

You may be able to work around your issue if you start by issuing a DocumentReference.get() call. We retry those automatically if the connection establishment takes a bit longer than it should.

@schmidt-sebastian Could I issue a listCollections() command instead? Does that also get retried automatically? We are running on kubernetes, and I'm thinking I could use listCollections as a sort of ping, which I could use in the readiness check to make sure kubernetes does not send requests to the process before it completes. What do you think?

listCollections() also gets retried automatically (and read-only operation does).

listCollections() also gets retried automatically (and read-only operation does).

I had the same error where I only was only reading and writing small amounts of records (not even a few hundred) per firestore get()/set(). I discovered for me the issue was I had too many operations happening in parallel as i was performing these operations nested within a for loop. Increasing timeout and memory did not help.
To resolve the error (similar to @ashking resolution) I updated my code to handle the firestore database operation callbacks using async/wait. I effectively removed any parallel firestore operations. This is working really well and no more errors, and things happen quickly which is good as I was concerned I would then hit the timeout limit if things happens one at a time. But seems faster if anything.
Hope this helps anyone stuck on a similar issue.

Would you have an example of your code? Right now I am randomly having this issue where the DB won't save the subcollection items (here the Assignments), in this case we have a 1 year dates lock so it never gets past 400 documents, yet it is triggering the error, sometimes the DB will retry and create the documents minutes later, sometimes it wont.
  await Promise.all(
    challenge.totalUser.map(async user => await assignToUser(user))
  );

Chiming in as we're also having a lot of DEADLINE_EXCEEDED. We are running similar code what was mentioned in this this thread.
Error: 4 DEADLINE_EXCEEDED: Deadline exceeded
   at Object.callErrorFromStatus (/workspace/node_modules/@grpc/grpc-js/src/call.ts:81:24)
   at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/src/client.ts:570:32)
   at Object.onReceiveStatus (/workspace/node_modules/@grpc/grpc-js/src/client-interceptors.ts:389:48)
   at /workspace/node_modules/@grpc/grpc-js/src/call-stream.ts:249:24
   at processTicksAndRejections (internal/process/task_queues.js:79:11)
Caused by: Error:
   at Firestore.getAll (/workspace/node_modules/@google-cloud/firestore/build/src/index.js:808:23)
   at DocumentReference.get (/workspace/node_modules/@google-cloud/firestore/build/src/reference.js:208:32)
   at DefaultFirestoreService.getUserData (/workspace/src/services/FirestoreService.ts:605:32)
   at processTicksAndRejections (internal/process/task_queues.js:97:5)
   at DefaultFirestoreService.updateUserTimeline (/workspace/src/services/FirestoreService.ts:667:22)
   at CronController.timelineUpdateForUser (/workspace/src/controllers/CronController.ts:173:7)

We are getting this error when fetching a document that isn't particularly large (below 1KB):
// this.firestoreClient is a Firestore() instance
const users = await this.firestoreClient.collection(collections.USERS).doc(userId).get()

It is happening very intermittently -- but sporadically, and is wreaking havoc in production. We see it most often in parts of the code where we are writing/reading a lot from Firestore. Is there any solution available to date, or should we just migrate to another DB that can support our load (which isn't really high, we're never doing more than ~100 read/writes per second)? Seeing that the issue was opened a couple years ago, and appears to still be happening, we're not very confident on being able to get this resolved at all with Firestore.

@superzadeh you sure there isn't anything else around that fetch query that might be looping over and increasing the function execution time? The issues I had were solved by splitting a few iteration-heavy functions into smaller ones that happen after some trigger events.

Any update or workarounds we could try? We are still having this issue happening frequently (every hour at least) in production.

The workaround i used was to convert it to a batch commit rather than one at a time limited to 450 records in each batch. Never had the issue again.

Thanks @ramzauchenna, are you referring to batched writes or something else?
The issue in our case is happening on reads, which don’t appear to have an option to be batched using the Firestore SDK.

@superzadeh Are you only reading a single document? Are you otherwise able to use Firestore?

@superzadeh Are you only reading a single document? Are you otherwise able to use Firestore?

No, we are reading multiple documents (a different one per HTTP request that comes in). The DEADLINE_EXCEEDED errors only happen during peak traffic, otherwise Firestore works as expected.
We were wondering if the soft limit of 1 write per second could be causing this issue? We are only writing to different documents in parallel to these reads, however each document is within the subcollection of a document.
Ex:
- users
   +-- foouser_doc_id
   +-- baruser_doc_id
          +-- Timeline Subcollection
                 +-- document 1
                 +-- document 2

We write only once in document 1 and document 2, however since they are both in a subcollection of the user document baruser_doc_id, could that count and triggers the soft limit of 1 write/second on the baruser_doc_id document?

I solved this by login into, google cloud console and choose your project.
then,

from left side menu click on Cloud functions,
Click on any cloud function you wish to increase timeout.
press edit. and increase timeout time.

I solved this by login into, google cloud console and choose your project.
then,

from left side menu click on Cloud functions,
Click on any cloud function you wish to increase timeout.
press edit. and increase timeout time.

July 2023 same issue

Hi @Dave181295, thank you for reporting this issue. If the problem is showing up consistently and you are able to reproduce it, please create a new issue ticket with a minimal reproducible app, and we can start looking into it.

SAME ISSUE TODAY
exports.setAuth = onCall(async (data, context) => {
const record = JSON.parse(data.text)
return admin.firestore().collection('users').doc(record['uid']).set(record).then(() => {
return admin.firestore().collection(record['team']).doc(record['team']).set(record).then(() => {
  return admin.firestore().collection(record['team']).doc(record['team']).collection('users').doc(record['uid'])
    .set(record).then(() => {
      const ar = ['task', 'gap', 'issue/risk', 'info', 'description']
      var batch = admin.firestore().batch();

      for (var i = 0; i < ar.length; i++) {
        const batchref = admin.firestore().collection(record['team']).doc(record['team']).collection('CustomTypeFieldSettingsCl0712').doc();
        batch.set(batchref, { 'fieldvalue': ar[i] })
      }

      // Commit the batch

      // we need a better 'first run' here
      return batch.commit().then(() => {
        const fname = record['currentUser'] + ':admin'
        admin.firestore().collection(record['team']).doc(record['team']).collection("users").doc(record['uid']).set({
          firstName: record['firstName'],
          email: record['email'],
          role: 'admin',
          phone: record['phone'],
          team: record['team'],
          subscription_activated: true,
          id: record['id']
        }).then(() => {
          return db.collection('Mail').doc()
            .set({
              'ownerEmail': [secret email names],
              'category': 'newuser',
              'content': `${record['firstName']} ${record['paypalEmail']} has signed up check it out at <a href="https://console.firebase.google.com/u/0/project/rexialoserviceseasypm/authentication/users">Firebase</a>`
            }).then((e) => {
              return 'SUCCESS'
            })

Error getting document:
T {code: 'auth/internal-error', message: 'Cloud function deadline exceeded.', a: null}
db.js:1134 Error updating user:
T {code: 'auth/internal-error', message: 'Cloud function deadline exceeded.', a: null}
a
:
null
code
:
"auth/internal-error"
message
:
"Cloud function deadline exceeded."
[[Prototype]]
:
Error


Refactor text data loading

Fixes #869
Updates tests (add multi-label and predict tests for every datasource)
Renames "labels" to DefaultDataKeys.TARGET globally
Refactors code in data.py
Fix minor bug in example notebook
Adds

TextParquetDataSource
TextHuggingFaceDatasetDataSource

NOTE
Check Docs error: in order for documentation to work, this checkpoint: https://flash-weights.s3.amazonaws.com/text_classification_model.pt
must be updated since TextSentenceDataSource does not exist anymore in favour of duplicated TextListDatasource (already present in the codebase, not introduced in this PR).
CI testing error: depends on Seq2Seq task that is not impacted by this PR.

Merged! I'll run the text classification example and update the sample weights to fix the build.


Code Coverage

As a developer I would like open-element-template to provide code coverage through web-component-tester-istanbul so that I can get an idea of how complete my test cases are (and so I can collect another badge).

See thedeeno/web-component-tester-istanbul#5 for details.
Also, not sure if Istanbul will provide code coverage for HTML... currently esprima chokes and spits out the error "Error: Line 1: Unexpected token <"


Function to Serialize JS objects in Query String Parameters

This is in reference to this line in the code:
o.data = Object.keys(o.data).map(function(key){ return key + "=" + encodeURIComponent(o.data[key]); }).join("&");
I just noticed that there is a very helpful utility function nested in 'fetch' that is not testable and not reusable even though it has pretty generic functionality (serializing objects into Query String params.)
Thoughts on moving this functionality into it's own utility method that is testable and reusable?
Lastly, I can make a pull request if necessary but I would suggest adding encodeURIComponent to the 'key' variable as well because JavaScript allows characters in object keys that need to be encoded in order to be valid query parameter keys. e.g. var params = { "tom & jerry": "friends" };

Heh, I've tried to do this so many times. One of them resulted in #136 . All of them however end up not being generic enough, or too big and add bloat that I'm not sure is worth it (to keep Bliss small, we need to exercise a lot of restraint).
You're welcome to try to adapt my PR or come up with your own solution! No promises it will get merged though, even mine didn't :P

Thanks for the heads up. I did not see that issue. I think at the minimum just taking the existing functionality and moving it to a place where it's testable and fixing the bug I mentioned above would be an improvement without trying to add new functionality.

I guess Lea already knows this, but in relation to this issue it can be interesting to note anyway:
The URL standard, https://url.spec.whatwg.org/, actually has a Query String builder in the form of URLSearchParams (see MDN docs) that while it doesn't provide a plain object to URLSearchParams converter can be used to set key/value pairs and have them be converted to a query string:
o.data = Object.keys(o.data).reduce(function (params, key) {
  params.set(key, o.data[key]);
  return params;
}, new URLSearchParams()).toString();

The URL standard sort of feels like the GET counterpart of the POST forms' FormData standard.
As Bless is about vanilla js it could perhaps be interesting to try and use suchna standard if one wants to make something like this more generic. That will also show possible short-comings in the standard which one can eg. propose extensions to fix where suitable – such as maybe a way to send in such a plain object directly into URLSearchParams as a setter counterpart to the existing .entries().
Not sure how if Bliss is generally positive or negative towards relying on polyfilling – it can surely make Bliss less small. If one would want to try and use more of the URL standard going forward then there seems to be polyfills like https://github.com/WebReflection/url-search-params out there anyway that one can use until non-Firefox browsers catches up on that spec part.

I've looked into URLSearchParams, no idea why I decided against using them there.
Support is not an issue, as we suggest using bliss along with polyfill.io.
I should look at them again.

@

URLSearchParams is useful if you want to manipulate a query string (probably intended for usage pushState and similar), but not as much if you want to build them from scratch from object literals. set only takes strings, so if you pass objects, arrays or other URLSearchParams it will convert them to strings ("[Object object]"). So it won't work with nested data structures, and for objects that aren't nested something like this is easier:
Object.entries(data).map(pair => pair.map(encodeURIComponent).join('=')).join('&')

I just posted an alternative suggestion (json) to this problem: #213

You can try to use q-flat package
It makes objects flat like this:
{
  "page": {
    "limit": 10,
    "offset": 55
  },
  "filter": {
    "year": {
      "gt": 2000
    }
  },
  "scalar": 3.1415,
  "categories": [
    1057
  ]
}

will be convert to
{
  "page[limit]": 10,
  "page[offset]": 55,
  "filter[year][gt]": 2000,
  "scalar": 3.1415,
  "categories[0]": 1057
}

More details:
https://github.com/sindresorhus/query-string/pull/147#issuecomment-394740580

You probably shouldn't use query strings for that ^. All your numbers will be converted to strings. See #213.

@friday well, I don't use query-string for that, I use that for query-string :)


Where is Method like flash.Display.Stage -> align = StageAlign.TopLeft;

Hello I have added suggestion but my code is not finish. I will add in Stage of createjs because I want use with Align of stage like flash player has same...
I found window.innerWidth and window.innerHeight like stage,stageWidth and stage. stageHeight;
/**
    StageAlign ( like Flash Player)
    StageAlign.js by SourceSkyBoxer
**/
this.createjs = this.createjs||{};

(function () {
    "use strict";
    function StageAlign() {
        this.Container_constructor();

    this = {
        TopLeft: function () {
            var div = document.getElementsByTagName("div");
            div.x = 0;
            div.y = 0;
            return div.toString();
        },

        Top: function () {
            var div = document.getElementsByTagName("div");
            div.x = window.innerWidth / 2;
            div.y = 0;
            return div.toString();
        },

        TopRight: function () {
            var div = document.getElementsByTagName("div");
            div.x = window.innerWidth;
            div.y = 0;
            return div.toString();
        },

        Left: function () {
            var div = document.getElementsByTagName("div");
            div.x = 0;
            div.y = window.innerHeight / 2;
            return div.toString();
        },

        Right: function () {
            var div = document.getElementsByTagName("div");
            div.x = window.innerWidth;
            div.y = window.innerHeight / 2;
            return div.toString();
        },

        BottomLeft: function () {
            var div = document.getElementsByTagName("div");
            div.x = 0;
            div.y = window.innerHeight;
            return div.toString();
        },

        Bottom: function () {
            var div = document.getElementsByTagName("div");
            div.x = window.innerWidth / 2;
            div.y = window.innerHeight;
            return div.toString();
        },

        BottomRight: function () {
            var div = document.getElementsByTagName("div");
            div.x = window.innerWidth;
            div.y = window.innerHeight;
            return div.toString();
        },

        Center: function () {
            var div = document.getElementsByTagName("div");
            div.x = window.innerWidth / 2;
            div.y = window.innerHeight / 2;
            return div.toString();
        }
    }
}

createjs.StageAlign = createjs.promote(StageAlign, "Container");

}());

This is small suggestion. But Center we need it. Because Adobe Flash Player won't use "Center" so sad.
I would like to suggest with CreateJS with "Center if your canvas has "no-scale" than shape or star doesn't resize like Flash Player's Display objects....
PS: Do not forget to add this.stageWidth = window.innerWidth; and this.stageHeight = window.innerHeight;
and
// stageWidth;
    p.stageWidtzh = function() {
        if(!this.canvas){
            return canvas.width = window.innerWidth;
        }
    }

    // stageHeight
    p.stageHeight = function() {
        if(!this.canvas){
            return canvas.height = window.innerHeight;
        }
    }

Wow it works fine.
Ops.... if i create code:
var camvas = document.getElementByTagName("canvas");
var stage = new createjs.Stage("canvas");
canvas.width = stage.stageWidth;
canvas.height = stage.stageHeight;

It means works good.
But I want half of width and half of height
var camvas = document.getElementByTagName("canvas");
var stage = new createjs.Stage("canvas");
canvas.width = stage.stageWidth / 2;
canvas.height = stage.stageHeight / 2;

Than it sees double bigger than normal? Eh?
I try other possible
var camvas = document.getElementByTagName("canvas");
var stage = new createjs.Stage("canvas");
canvas.width = stage.stageWidth * 2;
canvas.height = stage.stageHeight * 2;

It sees double smaller than normal.
Wow I am getting so close with Stage coding like missed Flash Player into javascript....

There is some support not in the HTML exported from AnimateCC for scaling and responsive behaviour that is similar to how Flash works with scale and align -- but this behaviour is not likely to be added to EaselJS anytime soon.
I am leaving this open for discussion for now.

There is some support not in the HTML exported from AnimateCC for scaling and responsive behaviour that is similar to how Flash works with scale and align -- but this behaviour is not likely to be added to EaselJS anytime soon.
I am leaving this open for discussion for now.

Thanks for help sorry i am very busy


Add mman::mprotect

It doesn't look like there's an existing test suite for mmap and friends, so this is regrettably untested.

Would you be willing to write a testsuite for mmap?

I don't think I'm the right person to do that; I don't know the APIs very deeply.

Is there anything else I need to do so that this can be merged? It keeps picking up conflicts in the changelog...

I would feel much better about the PR if there were some tests.  Even a simple doc test would be good.  Right now it's not obvious how to use it.  Also, unsafe functions' documentation blocks should say why they're unsafe, and what the user must do to use them safely.

Got it; I was following the pattern of the rest of the definitions in that module, which don't have those things; I'll get a doctest merged shortly.

Well, it looks like my test is only gonna pass on Linux, due to differences in how mmap works there. This is part of why I was hesitant to add any tests for mprotect while mmap itself doesn't have any; it's a big, complicated API and I am not equipped to portably test it.


Cannot find module 'cesium' in React (even after npm install)

Sandcastle example:
Sandcastle doesn't support import statemet!

import Cesium from 'cesium';

Browser: Error in CLI. Not a problem of browser.
Operating System:  macOS 10.15.4
Runtime:

node v12.16.3
npm v6.14.4

It works with require statement.
const Cesium = require('cesium');

Why don't you support ES6 module statement?

package.json
{
  "name": "web",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@babel/core": "^7.9.6",
    "@craco/craco": "^5.6.4",
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "@types/cesium": "^1.67.5",
    "@types/color": "^3.0.1",
    "@types/jest": "^25.2.2",
    "canvas": "^2.6.1",
    "cesium": "^1.69.0",
    "craco-cesium": "^1.2.0",
    "delay": "^4.3.0",
    "node-sass": "^4.14.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-scripts": "3.4.1",
    "resium": "^1.11.0",
    "typescript": "^3.8.3"
  },
  "scripts": {
    "start": "craco start",
    "build": "craco build; node dev/after-build.js",
    "test": "npx jest",
    "eject": "react-scripts eject",
    "lint": "npx eslint './src/**/*.{ts,tsx,js,jsx}'"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "@types/react-test-renderer": "^16.9.2",
    "@typescript-eslint/eslint-plugin": "^2.32.0",
    "@typescript-eslint/parser": "^2.32.0",
    "eslint": "^6.6.0",
    "identity-obj-proxy": "^3.0.0",
    "jest": "^24.9.0",
    "prettier": "^2.0.5",
    "react-test-renderer": "^16.13.1",
    "svgexport": "^0.4.0",
    "ts-jest": "^26.0.0",
    "uglify-js": "^3.9.3"
  }
}

@hsh2001 In the future, please ask for help on the forum, https://community.cesium.com.  If you still need help after the below answer, please start a thread there.
Ultimately, this is not a Cesium issue but instead a problem with your project configuration.  The below:

import Cesium from 'cesium';

is actually invalid JS code, the ability to import a module directly from NPM is something built into build tools, such as webpack and rollup, for example, https://github.com/rollup/plugins/tree/master/packages/node-resolve. When running in the browser without these tools, you need the full relative path to the specific JS file you are trying to load.
Inside Sandcastle itself, Cesium is automatically defined for you already.  Sandcastle is a prototype/learning tool, not meant for normal application development.
So Cesium is fully ES6 compatible and we use node resolution plugins in our own apps we build off Cesium, but you need to configure your own tools to behave that way.

(English is not my native language. Sorry for my bad english)
Yes, you are right! The import statement is not standard module system in ES. But in React, all JS/TS codes are built by webpack automatically. But the code below still doesn't work.
import Cesium from 'cesium'

Because Cesium does not export default module. In 'import/export' statement, there is a statement called export default that exports objects representing the module. Please refer to this link for more information.
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Statements/export
So you have to add above script to set Cesium as default export.
exports.default = Cesium;

@hsh2001 please use the community forum for questions (https://community.cesium.com/). This helps others find the answers they're looking for as well.
You need to import the specific classes you need as in this example: https://github.com/CesiumGS/cesium-webpack-example/blob/master/src/index.js or do import * as Cesium from 'cesium';.

Thank you for help @OmarShehata !

@hsh2001 bitte benutzen Sie das Community-Forum für Fragen ( https://community.cesium.com/ ).

Hi,
First of all, thanks to all and I am pleased that I have found something meaningful here.

Because there you get as good as no answers.
My last post there was 15 days ago.
I have problems with the whole sample codes when I add them to my TypeScript file. The compiler paints me as well as everything red. It is teeming with mistakes and none gives me a clever answer.
The imports into the whole examples are all wrong, except for this here: "import * as Cesium from 'cesium';"
Is there no discord channel for cesium, where you can support support?

Compiled with problems:
ERROR in ./src/component/map.js 6:0-35
Module not found: Error: Package path ./Cesium is not exported from package D:\map\fliterev-map\node_modules\cesium (see exports field in D:\map\fliterev-map\node_modules\cesium\package.json)
I have tried with may ways to import like -

"import * as Cesium from 'cesium';"
"import Cesium from 'cesium';"
"import * as Cesium from 'cesium/Cesium';"
"import Cesium from 'cesium/Cesium';"
"import { Viewer, createWorldTerrain, Cartesian3, Color } from 'cesium';"

but still shows error

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }'
- install 'stream-http'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "http": false }
    explain this


MQTT server is not reachable

Describe the bug
AMR2MQTT add-on refuses to connect to the Mosquitto MQTT server.
To Reproduce
Steps to reproduce the behavior:

For this to be reproducible you will need to be on the latest version of HomeAssistant, HomeAssistant OS and Supervisor (described in the latest section)

Go to Settings > Add-ons > AMR2MQTT
Click on 'Start'
Open the Logs tab and click on the Refresh button so you get always the latest
See the error in the logs section below

Expected behavior
AMR2MQTT successfully connects to Mosquitto MQTT broker.
Logs
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
-----------------------------------------------------------
 Add-on: AMR2MQTT
 AMR2MQTT for Home Assistant
-----------------------------------------------------------
 Add-on version: 2.1.2
 You are running the latest version of this add-on.
 System: Home Assistant OS 10.3  (amd64 / qemux86-64)
 Home Assistant Core: 2023.7.3
 Home Assistant Supervisor: 2023.07.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
Log level is set to DEBUG
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/02-set-timezone.sh
[08:13:59] INFO: Configuring timezone
cont-init: info: /etc/cont-init.d/02-set-timezone.sh exited 0
cont-init: info: running /etc/cont-init.d/30-config.sh
[08:13:59] DEBUG: Validate config and look for suggestions
[08:14:00] INFO: Ensure MQTT broker is reachable at core-mosquitto:1883 (60s timeout)
cont-init: info: /etc/cont-init.d/30-config.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun amr2mqtt (no readiness notification)
services-up: info: copying legacy longrun rtl_tcp (no readiness notification)
s6-rc: info: service legacy-services successfully started
[08:14:00] DEBUG: Setting MQTT details...
[08:14:00] INFO: Starting rtl_tcp daemon...
No supported devices found.
[08:14:00] WARNING: Halt add-on with exit code 1
s6-rc: info: service legacy-services: stopping
[08:14:00] INFO: Service restart after closing
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Environment (please complete the following information):

Add-on version: 2.1.2
Home Assistant version: 2023.7.3
Supervisor version: 2023.07.1
Operating System: Home Assistant 10.3

Additional context
What I have tried (several times)?

While I know restarting HomeAssistant will not restart the Docker containers for this add-on I have restarted it several times just in case
Restart both: the Mosquitto MQTT add-on and this AMR2MQTT add-on

I have the Ring-MQTT with Video Streaming add-on installed and is talking nicely with Mosquitto MQTT broker so the problem does not seem to be that add-on.
UPD: today I updated to the latest 2023.8.0 version and the following message popped up which might be part of the issue:

Discovered entities with a name that starts with the device name
This stops working in version 2024.2.0. Please address before upgrading.
Some MQTT entities have an entity name that starts with the device name. This is not expected. To avoid a duplicate name the device name prefix is stripped of the entity name as a work-a-round. Please inform the maintainer of the software application that supplies the affected entities to fix this issue.
List of affected entities:
sensor.energy_meter_consumption
sensor.water_meter_consumption
sensor.energy_meter_last_interval_consumption
Warning - 8/2/2023

https://github.com/mdegat01/addon-amr2mqtt/issues/97


[RESTEASY-1521]

Replace the string literal utf-8 by the StandardCharsets.UTF_8

@rsearls can you please review this as RESTEASY-1521 is assigned to you? Thanks


Labels layer / paint brush style annotation

🚀 Feature

In #100 @jni mentions

in the context of a labels layer I'm working on

I've made this issue to discuss this labels layer, and a possible paint brush annotation layer (which could or could not be related).
I'm curious @jni what you have planned for a labels layer. I've been thinking about a "paintbrush" layer where you can paint pixels either True or False, or one of N labels (depending on "color" of brush). Imagine you want to annotate foreground / background pixels, or background / cytoplasm / nucleus (say). The underlying data type would be an array though (often the same size as a corresponding image that you are painting over). You would also be able to change the size and shape of the brush, and have an eraser where you set pixels back to False or 0 (at which point they are no longer visible). Does this relate to how you are imaging the labels layer or would this be different?

@sofroniewn absolutely! My initial work will just be for displaying, but painting would totally work in the context of this layer. What I'm working on is more for segmentations but should be general enough for sparse labeling. Specifically, the value 0 will always be transparent.
So, in terms of interactivity, we can have "paint", and we can have "merge/split segments". Whether they belong in the same layer type or in subclasses is a question for a later time. =)

This sounds great!! I'd say get basics working as a static layer with no interactivity, and then we can see what makes the most sense.
I'd probably lean towards just having this as the same layer type and that we have different modes determined by buttons on the left hand side - like in the shapes layer, but now with things like "paint", "erase", "merge", "split" etc.

@sofroniewn one issue I'm handling now is that from what I can tell vispy colormaps have to be in [0, 1], so integer labels need to map to float and vice versa, in which case, it might be tricky to add arbitrary labels after the fact. On the other hand, the colormap could get updated dynamically, so I don't think it's a blocker, just perhaps more convoluted than it needs to be.

Hmm, that doesn't sound so desirable. I'm surprised vispy doesn't have support for more "categorical" colormaps. I can poke around too.

merged in #195


chore(deps): upgrade dependencies

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-main" workflow

Codecov Report

Merging #181 (285c9ad) into main (2974dfe) will increase coverage by 9.55%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #181      +/-   ##
==========================================
+ Coverage   83.33%   92.88%   +9.55%
==========================================
  Files           2        2
  Lines         126      478     +352
  Branches       31       49      +18
==========================================
+ Hits          105      444     +339
- Misses         21       33      +12
- Partials        0        1       +1

Impacted Files
Coverage Δ

example/src/main.ts
95.65% <100.00%> (+7.19%)
:arrow_up:

src/index.ts
91.76% <100.00%> (+9.76%)
:arrow_up:

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 47a82a9...285c9ad. Read the comment docs.


Controls?

I'm not familiar with Phaser... I guess I need to get there.In the meantime,  will you point me in the right direction for modifing the controls? F. N. Love it though mate. Really. You're missing a ; in math.ts
Cheers

In this game the level binds the user input and dispatches it to the player as events, this is because of how I unload and load worlds as you "zone" to different maps.
In the base level you can see where I map actions to keys:
https://github.com/englercj/lttp/blob/master/src/levels/Level.ts#L35-L64
and where I handle keyboard input:
https://github.com/englercj/lttp/blob/master/src/levels/Level.ts#L300
Keyboard input (and others) are bound here in the BaseState class, which Level inherits from:
https://github.com/englercj/lttp/blob/master/src/states/GameState.ts#L24
Hope this helps! Feel free to put in PRs, I don't have time to work on this much these days.

Awesome thanks for your help!


Bootstrap 5 : Event stopPropagation() or stopImmediatePropagation() is not working in According

Description
I am trying to apply a span tag with some click event inside my according header
but,
I do not want to show or collapse my according.
So I have used stopPropagation() and stopImmediatePropagation() but they both did not work.
window.foo = function(e) {
      e.stopPropagation();
     console.log('test')
}

Reduced test cases
Below is the working example which replicates the issue - https://jsfiddle.net/9pL40roz/1/
I want to achieve something mentioned in the link below - https://stackoverflow.com/a/24469635
What operating system(s) am I using?
Windows, macOS
What browser(s) am I seeing the problem on?
Chrome, Safari, Firefox, Microsoft Edge
What version of Bootstrap am I using?
v5.1.3

I think you are using div tag inside your accordion that is why all the div's inside your accordion get's expanded while clicking on accordion or on click me button.
I have modified and tested the code on JSFiddle while updating the div to button and it works fine for me.
Please have a look at the above jsfiddle link.
You can do it like defining button like below
https://jsfiddle.net/v527a4gs/3/

click me

or
define an anchor tag to get your desired result.
https://jsfiddle.net/v527a4gs/4/

click me

@Shakti1001 Thanks for your reply but don't you think it's a bug as this does not happens with BS 4. I mean I am currently converting a BS 4 Project to BS 5 that's why I personally think it's a bug

You're putting a clickable element inside a button and that isn't valid HTML or allowed by browsers. You'd need to drastically change your markup to make something like this work.

For those looking for a solution, this worked for me : https://stackoverflow.com/a/70664716/2352838