Miri UB warning about compat feature

I tried to use miri to check a piece of code, and accidentally found that the compat feature had some UB warnings.
use futures::future::TryFutureExt;
use futures::compat::Future01CompatExt;
use futures::executor::block_on;

fn main() {
    let fut = async {
        Ok(()) as Result<(), ()>
    };
    let fut = Box::pin(fut);
    let fut = fut.compat(); // 03as01
    let fut = fut.compat(); // 01as03
    block_on(fut).unwrap();
}

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=8ef0b573eab227a3fb307ca73df351bb
by default, miri will report an error saying that 0x1 is not a valid function pointer. I try to fix it,
diff --git a/src/task_impl/std/mod.rs b/src/task_impl/std/mod.rs
index e82a23e5..59f7a0f0 100644
--- a/src/task_impl/std/mod.rs
+++ b/src/task_impl/std/mod.rs
@@ -42,7 +42,7 @@ pub fn get_ptr() -> Option<*mut u8> {
     // used (the default), the branch predictor will be able to optimize the
     // branching and a dynamic dispatch will be avoided, which makes the
     // compiler happier.
-    if core::is_get_ptr(0x1) {
+    if core::is_get_ptr(fake_get_ptr as _) {
         Some(CURRENT_TASK.with(|c| c.get()))
     } else {
         core::get_ptr()
@@ -53,6 +53,9 @@ fn tls_slot() -> *const Cell<*mut u8> {
     CURRENT_TASK.with(|c| c as *const _)
 }

+fn fake_get_ptr() -> *mut u8 { std::ptr::null_mut() }
+fn fake_set_ptr(_: *mut u8) {}
+
 pub fn set<'a, F, R>(task: &BorrowedTask<'a>, f: F) -> R
     where F: FnOnce() -> R
 {
@@ -61,13 +64,11 @@ pub fn set<'a, F, R>(task: &BorrowedTask<'a>, f: F) -> R
     // Note that we won't actually use these functions ever, we'll instead be
     // testing the pointer's value elsewhere and calling our own functions.
     INIT.call_once(|| unsafe {
-        let get = mem::transmute::<usize, _>(0x1);
-        let set = mem::transmute::<usize, _>(0x2);
-        init(get, set);
+        init(fake_get_ptr, fake_set_ptr);
     });

     // Same as above.
-    if core::is_get_ptr(0x1) {
+    if core::is_get_ptr(fake_get_ptr as _) {
         struct Reset(*const Cell<*mut u8>, *mut u8);

         impl Drop for Reset {

but another error will occur
error: Undefined Behavior: not granting access to tag <untagged> because incompatible item is protected: [SharedReadOnly for <4348> (call 1302)]
   --> /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:904:9
    |
904 |         Box(unsafe { Unique::new_unchecked(raw) }, alloc)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not granting access to tag <untagged> because incompatible item is protected: [SharedReadOnly for <4348> (call 1302)]
    |
    = help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
    = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
    = note: inside `std::boxed::Box::<dyn futures::task_impl::UnsafeNotify>::from_raw_in` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:904:9
    = note: inside `std::boxed::Box::<dyn futures::task_impl::UnsafeNotify>::from_raw` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:849:18
    = note: inside `<futures::compat::compat01as03::NotifyWaker as futures::task_impl::UnsafeNotify>::drop_raw` at /home/user/workspace/fork/futures03/futures-util/src/compat/compat01as03.rs:346:14
    = note: inside `<futures::task_impl::NotifyHandle as std::ops::Drop>::drop` at /home/user/workspace/fork/futures-rs/src/task_impl/mod.rs:688:13
    = note: inside `std::ptr::drop_in_place::<futures::task_impl::NotifyHandle> - shim(Some(futures::task_impl::NotifyHandle))` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:188:1
    = note: inside `std::ptr::drop_in_place::<futures::task_impl::core::TaskUnpark> - shim(Some(futures::task_impl::core::TaskUnpark))` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:188:1
    = note: inside `std::ptr::drop_in_place::<futures::task_impl::std::TaskUnpark> - shim(Some(futures::task_impl::std::TaskUnpark))` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:188:1
    = note: inside `std::ptr::drop_in_place::<futures::task_impl::Task> - shim(Some(futures::task_impl::Task))` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:188:1
    = note: inside `std::ptr::drop_in_place::<futures::compat::compat03as01::Current> - shim(Some(futures::compat::compat03as01::Current))` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:188:1
    = note: inside `futures::compat::compat03as01::with_context::<std::pin::Pin<std::boxed::Box<std::future::from_generator::GenFuture<[static generator@src/main.rs:6:21: 8:6]>>>, std::result::Result<futures::poll::Async<()>, ()>, [closure@<futures::compat::Compat<std::pin::Pin<std::boxed::Box<std::future::from_generator::GenFuture<[static generator@src/main.rs:6:21: 8:6]>>>> as futures::future::Future>::poll::{closure#0}]>` at /home/user/workspace/fork/futures03/futures-util/src/compat/compat03as01.rs:201:1

If -Zmiri-track-raw-pointers is enabled,
error: Undefined Behavior: trying to reborrow for SharedReadWrite at alloc1445, but parent tag <3312> does not have an appropriate item in the borrow stack
   --> /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:324:18
    |
324 |         unsafe { &*self.as_ptr() }
    |                  ^^^^^^^^^^^^^^^ trying to reborrow for SharedReadWrite at alloc1445, but parent tag <3312> does not have an appropriate item in the borrow stack
    |
    = help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
    = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

    = note: inside `std::ptr::NonNull::<alloc::sync::ArcInner<futures::futures_executor::local_pool::ThreadNotify>>::as_ref` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/non_null.rs:324:18
    = note: inside `std::sync::Arc::<futures::futures_executor::local_pool::ThreadNotify>::inner` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:1071:18
    = note: inside `<std::sync::Arc<futures::futures_executor::local_pool::ThreadNotify> as std::clone::Clone>::clone` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs:1329:24
    = note: inside `<std::mem::ManuallyDrop<std::sync::Arc<futures::futures_executor::local_pool::ThreadNotify>> as std::clone::Clone>::clone` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/manually_drop.rs:50:5
    = note: inside `futures_task::waker::increase_refcount::<futures::futures_executor::local_pool::ThreadNotify>` at /home/user/workspace/fork/futures03/futures-task/src/waker.rs:36:44
    = note: inside `futures_task::waker::clone_arc_raw::<futures::futures_executor::local_pool::ThreadNotify>` at /home/user/workspace/fork/futures03/futures-task/src/waker.rs:41:5
    = note: inside `<std::task::Waker as std::clone::Clone>::clone` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/task/wake.rs:273:29
    = note: inside `futures::compat::compat01as03::<impl std::convert::From<futures::compat::compat01as03::WakerToHandle> for futures::task_impl::NotifyHandle>::from` at /home/user/workspace/fork/futures03/futures-util/src/compat/compat01as03.rs:327:40

I am not sure what this means, maybe @RalfJung can help.

This might be an instance of https://github.com/rust-lang/unsafe-code-guidelines/issues/148? Unfortunately I don't have the time to dig further into this right now.

Would be good to try this again once https://github.com/rust-lang/miri/pull/1952 lands and it shipped; that PR adds a (temporary) work-around for https://github.com/rust-lang/unsafe-code-guidelines/issues/148, at least for self-referential generators.

I retried it at nightly (rustc 1.60.0-nightly 89b9f7b28 2022-01-10) and it now throws the error in another place.
error: Undefined Behavior: not granting access to tag <untagged> because incompatible item is protected: [SharedReadOnly for <4095> (call 1216)]
   --> /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/task/wake.rs:281:5
    |
281 | /     fn drop(&mut self) {
282 | |         // SAFETY: This is safe because `Waker::from_raw` is the only way
283 | |         // to initialize `drop` and `data` requiring the user to acknowledge
284 | |         // that the contract of `RawWaker` is upheld.
285 | |         unsafe { (self.waker.vtable.drop)(self.waker.data) }
286 | |     }
    | |_____^ not granting access to tag <untagged> because incompatible item is protected: [SharedReadOnly for <4095> (call 1216)]
    |
    = help: this indicates a potential bug in the program: it performed an invalid operation, but the rules it violated are still experimental
    = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information

    = note: inside `<std::task::Waker as std::ops::Drop>::drop` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/task/wake.rs:281:5
    = note: inside `std::ptr::drop_in_place::<std::task::Waker> - shim(Some(std::task::Waker))` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:188:1
    = note: inside `std::ptr::drop_in_place::<futures::compat::compat01as03::NotifyWaker> - shim(Some(futures::compat::compat01as03::NotifyWaker))` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:188:1
    = note: inside `std::ptr::drop_in_place::<std::boxed::Box<dyn futures::task_impl::UnsafeNotify>> - shim(Some(std::boxed::Box<dyn futures::task_impl::UnsafeNotify>))` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ptr/mod.rs:188:1
    = note: inside `std::mem::drop::<std::boxed::Box<dyn futures::task_impl::UnsafeNotify>>` at /home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:909:24
    = note: inside `<futures::compat::compat01as03::NotifyWaker as futures::task_impl::UnsafeNotify>::drop_raw` at /home/user/workspace/fork/futures03/futures-util/src/compat/compat01as03.rs:346:9

I guess the SB violation is due to futures 0.1's UnsafeNotify::drop_raw.
https://github.com/rust-lang/futures-rs/blob/47b876fb67cf91833d04ed07720b82fc599fac93/src/task_impl/mod.rs#L551-L561
https://github.com/rust-lang/futures-rs/blob/47b876fb67cf91833d04ed07720b82fc599fac93/src/task_impl/mod.rs#L584-L607
https://github.com/rust-lang/futures-rs/blob/47b876fb67cf91833d04ed07720b82fc599fac93/src/task_impl/std/mod.rs#L642-L657


Dev Feature 5 - Changing Collection Authors

Adds authorswaps table with collection_name key and current_author, new_author, permission and swap_date fields
Current authors are able to create "author swap listings" with must then be accepted by the recipient "new_author"
Author swaps can be accepted immediately if the permissions used to create the listing are 'owner'
Author swaps can be accepted after 1 week (by default) if the permissions used to create the listings are 'active'
Author swaps can be rejected / declined / erased by both the current_author & the new_author at any given time
Author swaps expire after 3 weeks (by default) & must be destroyed & then recreated (just for safety purposes)

I don't really like how the different cases between owner and active are implemented. Here is what I would suggest:

The authorswaps table doesn't store the permission and the swap date (when it was created), but instead stores only an acceptance_date which is the time at which the swap can be accepted.
When creating an authorswap, the permission level isn't explicitly provided as owner or active, instead you just have a boolean value for whether you want to use the owner permission. You by default you just use require_auth(current_author) to check general permission, and if the boolean value is true, you require the owner auth. And then you emplace the entry into the authorswaps table where the acceptance_date is now + 1 week by default or simply now if the owner option is used.

Makes sense. Just realized it becomes a bit finicky either way for collections made with WCW, but don't think there's much that can be done there.

Incorporated all comments above, potential edge case when swapping authors in regards to authorized_editors & notification_recipients for a collection, otherwise ready for production.


Memory Leak

Hello Team GPUImage ,
@BradLarson currently I'm facing memory issue, where whenever I am going to implement any filter on a video having a size around 60 to 80mb or more, then the code will crash and I'll get this message "Message from debugger: Terminated due to memory issue".

我也是遇到了这个问题，在代理方法didOutputSampleBuffer 中调用代理时遇到的，怎么解决呢


Incorrect handling of escaped identifiers

Tailor Version: v0.11.1
Swift Version: 3.0.2
Platform: Windows
Installation Method: Install Script
Example file
Running tailor with default settings on this example file finds a violation where it should not:
class SomeClass {
    let `fubar`: Int
    let fubar2: Int
}

The second property is there to verify that the issue arises from the backticks.
Expected Behavior
No violation
Actual Behavior
Analyzing 1 file:
.

********** example.swift **********
example.swift:2:9: warning: [constant-naming] Global Constant should be either lowerCamelCase or UpperCamelCase

Analyzed 1 file, skipped 0 files, and detected 1 violation (0 errors, 1 warning).

Closing this issue and tracking it under #460.


focused_crawl returns nothing

Hello,
focused_crawl cannot exploit URLs in certain websites. Is there any parameter or method to overcome this problem?

The task is complex and the focused crawler integrated in Trafilatura does not solve all problems. I cannot answer this question in general. Do you have a precise example for me to reproduce?

Here is my code with an example input.
Code:
def crawl_homepage(homepage_url, max_iteration, output_file):
    to_visit, known_links = focused_crawler(homepage_url, max_seen_urls=1)

    i = 0
    while i < max_iteration:
        to_visit, known_links = focused_crawler(homepage_url, max_seen_urls=10, max_known_urls=300000, todo=to_visit, known_links=known_links)
        print("LEN", len(known_links))
        save_links_to_file(known_links, output_file + ".json")  # Save links to file after every iteration
        i += 1
    print(f"Finished crawling. Total iterations: {i}")

homepage_url = "https://tr.motorsport.com"
p.s: the page has nothing to do with my task, I share a random url that fails in the extract process.

If you set the logging level to debug you'll see that the download fails (403 error), so there are no links to extract.

How to fix it? I want to be able to get the news links in the website.

You have to use a more complex download utility to make sure you get the full content, then you can use Trafilatura on the HTML.

Thank you Adrien!


feat: show receipt time on transaction page

Close #1030
On the transaction details page, for pending transactions (mempool), I added a new component for receipt time labeled "Broadcasted"

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

Thank you @andresgalante, margin left 16px removed

Awesome @dragnoir! Please fix linting so that we can proceed with shipping it.

Also, wondering if you could add a snapshot test for src/app/txid/[txid]/TxDetails/Broadcasted.tsx. This would be amazing!

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


Phase-3: Send mail to client from portal

Targets #1201

Description

Checklist:

[x] I have performed a self-review of my own code.

There was a problem with this PR, so it was closed.


Extensions for image downloading and caching

Extension for UIImage downloading and caching through NetClient subspec.

It doesn't make sense, we'll use onevcat/Kingfisher 🤣


BERT Wasm

Create BERT Wasm module

Use serde-wasm-bindgen, I guess it avoids some json (de)seralization

Create simple js example, webWorker, extra fancy ui to highlight similarities

Live Demo: https://huggingface.co/spaces/radames/Candle-BERT-Semantic-Similarity-Wasm

Great, thanks a lot!


IMSC 1.1 profiles missing

The following IMSC 1.1 profile URIs should probably be added to the checks of NamespaceURI item of the Timed Text descriptor (only for IMF 2020 compositions):
http://www.w3.org/ns/ttml/profile/imsc1.1/text
http://www.w3.org/ns/ttml/profile/imsc1.1/image
urn:ebu:tt:distribution:2014-01
http://www.w3.org/ns/ttml/profile/sdp-us
https://github.com/Netflix/photon/blob/3f4677e92be1a4e85bc2f4f3a1df31329d0fbb29/src/main/java/com/netflix/imflibrary/IMFConstraints.java#L52

The related PR #344 has been updated.

Thanks Wolfgang! I merged the changes, and released as v4.10.6.


Extended Version constructor

Simple change allowing the commit_count can now be set via the param.Version constructor.

Coverage decreased (-0.1%) to 69.559% when pulling f01f2ff4679b10aac7c18efc888e051b369ef0ca on version_commit_count into cbd714ff640b07e262b0299270d174dce2d520ee on master.

Coverage decreased (-0.1%) to 69.559% when pulling 59a51ee9b48aa505ad8766b9790ade057720c047 on version_commit_count into cbd714ff640b07e262b0299270d174dce2d520ee on master.

Coverage decreased (-0.1%) to 69.559% when pulling 59a51ee9b48aa505ad8766b9790ade057720c047 on version_commit_count into cbd714ff640b07e262b0299270d174dce2d520ee on master.

Looks fine. Merging.


⚠ ClamAV has degraded performance

In 158bdbc, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 103 ms

Resolved: ClamAV performance has improved in 97b4b60.


add amplitude plugin to show metrics in backstage

add amplitude plugin to show metrics in backstage
todo:
I plan to add the same card but for entities using an annotation for the chart-id

:heavy_check_mark: Checklist

[ ] Added tests for new functionality and regression tests for bug fixes
[x] Added changeset (run yarn changeset in the root)
[ ] Screenshots of before and after attached (for UI changes)
[x] Added or updated documentation (if applicable)

Is this still being worked on?


KOGITO-458 Add health check for Data Index service

Adding the health check for kafka and infinispan in the same way as the jobs-service.

@MarianMacik do you mind to take a look at this, it is basically the same as the jobs-service health-check.

@tiagodolphine Sonar is complaining about coverage of new code. Might be worth adding some?

@ricardozanini well the only new code we are adding on the PR is a Producer that basically instantiates a new object for the InfinispanHealthCheck, there is no logic to be tested. IMHO there is no need to test it, wdyt?

@ricardozanini well the only new code we are adding on the PR is a Producer that basically instantiates a new object for the InfinispanHealthCheck, there is no logic to be tested. IMHO there is no need to test it, wdyt?

Well, tell that to SonarCloud :p


Split rotary snakefile into multiple files

To make rotary's code more understandable, we should split the current rotary.smk into multiple snakefiles, for example:

main: rotary.smk
download: download.smk (with DB versions)
long read qc: qc_long.smk
short read qc: qc_short.smk
assembly: assembly.smk
polishing: polish.smk
circularization: circularize.smk
annotation: annotate.smk

@LeeBergstrand Are you okay to do this after we merge the current develop into master?

@jmtsuji Sure!

Addressed in #114 (for some reason, linking the PR to the issue doesn't seem to be closing the issue automatically once the PR is merged)


Suggestion

Hello Aidaho,
at first I like to say you did a really good job here. Move on. :+1:
I think some documentation is deprecated or missing
INSTALL last line $ sudo ./install doesn't work for me instead: $ sudo ./install.sh
MANUAL INSTALL $ chown -R apache:apache haproxy-wi/ A moore general setup may be www-data:www-data My apache work with this too....
A short information of how to 'swarm' for docker may be come in handy for new users. (In reference to my comment here #24 I installed it 3 times for testing)
A command to transmute a generated id_rsa to pem openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem and or a ssh-copy-id suggestion
Sorry, I hitted Enter after writing the Title....

So what the suggestion?

Thank you)
Without sudo work install.sh?
Ok, add owners for debian like linux
Not undestens about swarm? You meen add manual for docker standalon? Or why you installed 3 times?)

Hi, updated readme

Not everything is working like you intend...
Stats
Map -> Blank page loads
Metrics ->

The requested URL /app/templates/metrics_out.html was not found on this server.

in ubuntu docker and dietpi minimal debian. This applies also to
Stats
WAF
Not Found

The requested URL /app/templates/metrics_waf_out.html was not found on this server.

WAF Installation fails with An error occured: UNIQUE constraint failed: waf.server_id state information... Can't compile web application
Versions and keepalived not tested
everything else seems to work like it should.
I have a second raspberry pi3b and i could set it up for you that you can test it yourself. (For a week/month or so)
Greetings ichbestimmtnicht.

The requested URL /app/templates/metrics_out.html was not found on this server.

It error should go out when you will enable metrics, about second "404" same reason
About "Map -> Blank page loads" I need to look at the log

I have a second raspberry pi3b and i could set it up for you that you can test it yourself. (For a week/month or so)

It would be cool )

Dietpi is up and running.
I sent an email to your public email from your profile with the credentials
At this state git, python2&3 pip, openssh-server, haproxy, apache2, php7, rsyslog and sqlite are installed by dietpi-software for the default minimal setup without them all installed (dietpi-ramlog 1h clear + dropbear + cron as default) restore it with sudo dietpi-backup otherwise it would be recommend to backup the existing configuration.

this is on a 2GB sdcard so if you wanna have different backup points save them at your favourite place. the actual backup are ~570MB and 403MB are left to use on the partition

dietpi-sync and/or dietpi-drive_manager (for network attached storage) may come in handy for this

note that dietpi has it's own service manager 'sudo dietpi-services restart haproxy' for example to control services.

docker.io is also avaivable through sudo dietpi-software in case you wanna restore it to the minimal one and work with docker.

Have fun. :1234:


MDX + KaTeX Pages

Is there a way to make MDX pages not in the blog also render KaTeX? I've figured out how to make MDX pages by following the MDX Guide, but the Math Blocks Page doesn't work. I would like to see pages that support MDX + KaTeX just like blog.
When I follow the MDX Guide, I get
next.config.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from package.json
The first idea keeps telling me to make more files end in .cjs and looks like a cycle that never ends. The second idea tells me SyntaxError: Cannot use import statement outside a module. The third idea doesn't seem to do anything.
My NPM version is 7.24.1 and I just cloned this repository today.
Help would be greatly appreciated! Thanks in advance.

Yes, it's possible - see the author page for an example.
I am not sure what you are implementing on MDX. There should be no other configuration required since the template already uses XDM to compile MDX.

Hmm, if I don't configure anything and create a MDX files in the /pages directory, even without KaTeX it shows the following

Do I have to create it in a different folder?

Yes, the pages folder only accepts tsx files. You have to load the .md or .mdx files from the data folder. Again, please see the author page for an example. This template does not use mdx-js loader so if you are looking for something like what you describe, you should look elsewhere.

Thanks for the help! I'll look elsewhere.


Document managing dependencies

Add a document on managing dependencies and use glide-vc to clean up the vendor directory.

lgtm. Thanks for the doc :)


🐛  Biome JetBrains IDE plugin suggests lint fixes, despite having disabled the linter in biome.json

Environment information
IDE plugin 1.0.2 (GoLand 24.1) https://plugins.jetbrains.com/plugin/22761-biome/versions

What happened?
I'm using Biome as a formatter only, and would like it to respect the biome.json. However, in my editor, I'm getting lint suggestions, despite that not being something I configured.
Expected result
The IDE plugin should respect the biome.json
Code of Conduct

[X] I agree to follow Biome's Code of Conduct

Problem persists on the newest published version of 1.2.1.
A really annoying problem.
I guess, I would have to switch back to prettier until this is resolved...


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/116359

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/116557

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/116560

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/116722

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/117713


Add support for HTTPS targets

Resolves #4

Cool! Docker image is building now. https://github.com/jauderho/dockerfiles/runs/4168475783?check_suite_focus=true

@jauderho thank you for taking the time to create the docker image. I will add information about the docker image being available in the documentation (I'm planning to do an overhaul of the docs).


ApiImplicitParam should support class as parameter

Currently we know it's important to set name, dataType and paramType for ApiImplicitParam just like the example:
@ApiImplicitParam(name = "name", value = "User's name", required = true, dataType = "string", paramType = "query")

However, if this implicit parameter is needed for several REST api, it has to be copied and pasted several times. Worse case is when you need to change it, you have to change it several times as well. Instead, it could be simplified by supporting class as parameter like this:
@ApiImplicitParam(class=User.class)

And User.class could provide necessary information like name, value etc.

It would be convenient, to do something like this, yes

https://github.com/swagger-api/swagger-core/issues/2068 has been merged so this can probbaly be closed


ssh tunnel feature fails to interpret my arguments correctly

Maybe I'm doing something wrong here?
Note that I sanitized this output by replace my regular username with "user" and the hostname with "hostname".
ERROR: sshtunnel.go:53: SSH Tunnel: dial tcp: lookup user-adm: no such host
user@user-imac ~ $

Hi! Thanks for reporting this, it's a bug. The '-' character in your username seems to be breaking the parsing of username@hostname parameter.


Issue #10757: bugfix -> localStorage Path does not work

set LocalStoragePath from Config
Issue #10757

Closing this PR because it's old.


Update the dependency to core-java 0.10.35-SNAPSHOT.

Auto-generated PR to update core library dependency to the latest version.

Closing this PR as the version has already been updated in https://github.com/SpineEventEngine/jdbc-storage/pull/59.


Call data not being returned for variants/search

When we run the callsets-search client command, no call data is returned (regardless of what is provided to the callSetIds parameter).

Fixed in #309


Molecular representations for bio-molecules

Dear maintainers of DScribe package,
Thank you for the nice package that provides easy access to the alternative to classical (Morgan fingerprints, MACCS, etc.) molecular representations. May I ask you which of the representations besides Coulomb Matrix from your package are applicable to biochemistry tasks (non-crystalls)?
Best regards,
Anton.

Hi @CalmScout,
I would say this depends a bit on what kind of description you are looking for: are you interested in describing a feature that is localized (e.g. binding site in a protein) or a feature that depends on the global structure of a molecule (e.g. formation energy)?
For local features, I would recommend SOAP, for global features I would recommend MBTR. With these two you can get started.
-Lauri


Documentation improvements.

Codecov Report

Merging #1593 (b3bf9a5) into main (5945dbf) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1593      +/-   ##
==========================================
- Coverage   93.75%   93.74%   -0.02%
==========================================
  Files         251      251
  Lines       46278    46279       +1
==========================================
- Hits        43388    43384       -4
- Misses       2890     2895       +5

Impacted Files
Coverage Δ

src/aggregation/bucket/histogram/histogram.rs
99.61% <ø> (ø)

src/core/inverted_index_reader.rs
72.86% <ø> (ø)

src/core/segment_reader.rs
90.76% <ø> (ø)

src/directory/file_slice.rs
75.79% <ø> (ø)

src/indexer/segment_updater.rs
95.44% <ø> (ø)

src/postings/recorder.rs
98.56% <ø> (ø)

src/postings/stacker/term_hashmap.rs
100.00% <ø> (ø)

src/schema/bytes_options.rs
100.00% <ø> (ø)

src/schema/mod.rs
100.00% <ø> (ø)

src/schema/term.rs
85.65% <ø> (ø)

... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


FTPS only alert in Azure Advisor recommendations

Hi Teams,
Please kindly advise if we can follow the following remediation advises in Company Communicator, from Azure Advisor recommendations:

Thanks

Hi @rex-ma ,
We will look into this and get back to you with proper response soon.
Thank you.

Hi @rex-ma ,
Our initial testing suggest that by changing the FTP state from all allowed to FTP's only, functionality remains undisturbed.
However as this is not part of official release.


Fix error check in trampoline.c

The appsec helper library has a call to dlopen() during constructors that may fail. Without clearing it, a call to dlerror() after a successful call to dlsym() will return the previous error message.
man 3 dlsym() says:

The correct way to distinguish an error from a symbol whose value is NULL is to
call  dlerror(3)  to clear any old error conditions, then call dlsym(), and then call dlerror(3) again, saving its
return value into a variable, and check whether this saved value is not NULL.

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

Project coverage is 70.28%. Comparing base (cc8ed56) to head (ce14840).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #569      +/-   ##
==========================================
+ Coverage   70.10%   70.28%   +0.17%
==========================================
  Files         214      214
  Lines       28801    28784      -17
==========================================
+ Hits        20192    20231      +39
+ Misses       8609     8553      -56

Components
Coverage Δ

crashtracker
21.20% <ø> (ø)

datadog-alloc
98.73% <ø> (ø)

data-pipeline
50.00% <ø> (ø)

data-pipeline-ffi
0.00% <ø> (ø)

ddcommon
83.07% <ø> (ø)

ddcommon-ffi
70.20% <ø> (ø)

ddtelemetry
58.95% <ø> (ø)

ipc
84.18% <ø> (ø)

profiling
84.26% <ø> (+0.69%)
:arrow_up:

profiling-ffi
77.42% <ø> (ø)

serverless
0.00% <ø> (ø)

sidecar
34.55% <ø> (ø)

sidecar-ffi
0.00% <ø> (ø)

spawn-worker
54.98% <ø> (ø)

trace-mini-agent
70.88% <ø> (ø)

trace-normalization
98.24% <ø> (ø)

trace-obfuscation
95.73% <ø> (ø)

trace-protobuf
77.16% <ø> (ø)

trace-utils
91.49% <ø> (+0.58%)
:arrow_up:


subUrl property is private - BaseSchema

Due to the visibility of the property $subUrl in the BaseSchema it is not possible to overwrite it in the self implemented Schema itself.
https://github.com/neomerx/json-api/blob/master/src/Schema/BaseSchema.php#L40
Is this intended or should this property be protected instead?
Or is there something i miss?

Yes, it's done intentionally because URLs typically have a certain format and the field you refer to is a caching field.
You can overwrite method getResourcesSubUrl if you want subUrl to be composed in a different way.

Okay.
So then the if construct where subUrl gets checked if it is null is unnecessary cause there is no setter for subUrl, and to the nature of private there is no possibility to assign any value to it.
In fact the subUrl property can be removed - am i right?

If you want getResourcesSubUrl behave differently you will need to override it. Feel free to add any new protected or private fields.
Also, you don't have to inherit from BaseSchema and can implement SchemaInterface from scratch. That would be only a few tens of lines and BaseSchema is a good starting point.

I think that we got carried away a little.
I know that i can override getResourcesSubUrl if i want to change the behaviour and also that i can implement my own BaseSchema which implements SchemaInterface.
But i am talking about the current implementation of BaseSchema which contains a private property without any setter for it, which implies that the value of this property can never change and therefore will always be null.
Which leads that the current implementation of getResourcesSubUrl in the BaseSchema can be broken down to a simple
    /**
     * Get resources sub-URL.
     *
     * @return string
     */
    protected function getResourcesSubUrl(): string
    {
        return '/' . $this->getType();
    }

and in addition the property subUrl can be removed cause it is never be used.
On the other hand if subUrl in the BaseSchema get its visibility changed from private to protected everyone who extends BaseSchema can set it in their Schema class and therefore the current implementation of getResourcesSubUrl in the BaseSchema makes sense.

But i am talking about the current implementation of BaseSchema which contains a private property without any setter for it, which implies that the value of this property can never change and therefore will always be null.

What do you think this line does?

ahh - thats why you are referring to it as caching variable.
Ok then nvm - i will close this issue.
All questions answered - Thanks


[BUG] Unable to authenticate SMTP due to inability to set username

Describe the bug
Arguably in-between a bug/feature request but I'd class it as a problem with existing functionality rather than a request for new functionality, so I'm choosing bug! I'm not able to use SMTP notifications because my SMTP provider pre-generates usernames to be a random alphanumeric string rather than an email address, and the config.yaml file only allows me to input sender/receiver email addresses and not the username for smtp auth.
To Reproduce
Steps to reproduce the behavior: Try to use AWS SES or any other similar SMTP provider with this project
Expected behavior
I'm able to customise the SMTP username to be different than the sender email address.
Below is what I'd expect the SMTP section of the config.yaml file to look like:
email<EMAIL_ADDRESS># username: "" # Uncomment this if your SMTP username is different than your sender address
# to<EMAIL_ADDRESS># Uncomment this if you'd like to send notifications to a different email address than your sender address
password: ""
host: ""
port: 587
# no_tls: true # Uncomment this if your SMTP provider doesn't support TLS

Wow I didn't expect this to be looked at for ages, kudos @mandarons!


Live data stream for plotting

What problem does this feature solve?
Hi I need plot an OHLC chart, I am using a websocket implementation and I have a data stream.  I need plot live data, is possible in OHLC charts and another types?.  Thanks
What does the proposed API look like?

Hi @bashman . You can always use setOption to update the data when new data comes.

@pissang when updating with the data with setOption I receive: Error: setOption should not be called during main process.


Update: add viewParams option for GetFeature requests

Referred to the issue #100

Hi, viewParams is a vendor option in geoserver WFS implementation, it is not correct to add just one for each such property. Right way is to add object property to parameters as vendorOptions and pass any of you want into it.
For example:
var options = {
        url: 'http://geoserver.ics.perm.ru/geoserver/ows',
        typeNS: 'topp',
        typeName: 'tasmania_cities',
        geometryField: 'the_geom',
        namespaceUri: 'testUri',
        maxFeatures: 5000,
        vendorOptions: {
          viewParams: 'from...to...',
          foo: 'bar',
          'customNS:customTag':'value'
        }
      };

var wfs = new L.WFST(options).addTo(map);

Please change your code to this behavior.

Also dont include dist folder into PR (it is already in gitignore). Don't change package.json, and commit package-lock.json.

In your opinion, this enanchment could be released with a new version v2.0.1-beta.26 ?
Thank you!

Any news about a possible new version v2.0.1-beta.26 with this fix?

@kuzkok, @DubrovinPavel, please publish new beta version.

At the moment, no version v2.0.1-beta.26 found on npm :'-(

version v2.0.1-beta.26 was published today https://www.npmjs.com/package/leaflet-wfst/v/2.0.1-beta.26, thanks for PR.

Thank you very much! 👍


z_shieldcoinbase returned error: Error: z_shieldcoinbase is disabled. code -4

What did I do wrong? Where is this enabled for a z-based coin? The config has the Z-addy and the t-addy for the pool, but when the payment process goes to shield the balance, I get these errors:
[2018-02-26 15:53:35.5489] [I] [Vision] [ZCash Payout Handler] Shielding ZCash Coinbase funds
[2018-02-26 15:53:35.5489] [E] [Vision] [ZCash Payout Handler] z_shieldcoinbase returned error: Error: z_shieldcoinbase is disabled. code -4

In earlier versions of ZCash "z_shieldcoinbase" had to be enabled via command-line switch. Run zcashd (or whatever its called for your coin) and look for "experimental".

Depends on the interval set in your payment processing config.

@oliverw Using release 19, the following error occurred:
[PayoutManager] [zec1] Payment processing failed Newtonsoft.Json.JsonReaderException: Error reading string. Unexpected token: StartObject. Path ''.
zcash.conf
addnode=testnet.z.cash rpcuser=test rpcpassword=test showmetrics=0 gen=0 testnet=1 rpcallowip=<IP_ADDRESS> rpcport=8333 zshieldcoinbase=1 experimentalfeatures=1

Same error here

@Gadflyii is this issue solved in release 20?

@calvintam236 Still not solved, the same mistake, but the miners can receive the fee.

Fixed in master.


Teal for Pycharm (Emmylua)

Hi.
I think that having a pycharm plugin for teal would open up this amazing dialect to a much larger audience.

We would love to see it! If you make one or spot one in the wild, please make to make a PR to add to the list here!


New Windows 10 Version 10.0.18865.1000

Version  10.0.18865.1000 is not supported,
Is there anyone who can give the lines to update the .ini file ?
Regards,

so ? no ones ?

You're talking about an insider build from March 27. 2019?  First off, this is an old build, second, I would recommend staying off insider builds if you need this as they change to quickly.
https://blogs.windows.com/windowsexperience/2019/03/27/announcing-windows-10-insider-preview-build-18865/

ok but if there any way to install rdpwrap on this version of windows ?

ok but if there any way to install rdpwrap on this version of windows ?

use rdpwrap_ini_updater : https://github.com/stascorp/rdpwrap/issues/795#issue-448382061

ok but if there any way to install rdpwrap on this version of windows ?

use rdpwrap_ini_updater : #795 (comment)

This does not contain the offsets for this version of Windows.

ok but if there any way to install rdpwrap on this version of windows ?

Again, this is an old insider build.  Unless someone is going to spend the time going through the temsrv.dll file for a version of Windows that you can't even get anymore, you're not going to be able to install the software. I would recommend staying on a regular released build if you need RDPWrap.  This is currently 10.18362.145 (Termsrv.dll version 10.18362.53).


Request: Be able to run tests on existing server

Is your feature request related to a problem? Please describe.
Currently appsody run runs the container project in the foreground of the shell. If I open a new terminal tab and do appsody test, it kills the appsody run process and the appsody test process fails too.
My current understanding is that if I want to run a test, I first have to kill the running container and then issue appsody test. Doing appsody test boots up an entire new container, starts a server from scrach, and then runs the tests. With the basic generated starter project this took 60 seconds on my machine (newish macbook pro).
Describe the solution you'd like
We should be able to run tests if the server is already running. The actual time it takes for the starter tests to run is about 1 second, so this would greatly cut down on the "inner dev/test loop" by not having to stop->start->stop containers/servers each time the developer wants to run a test.
Describe alternatives you've considered
I briefly consulted the "local development" doc page but did not see any mention of a way to run tests on an existing container.

appsody test runs maven pre-set maven commands in both the Spring and microprofile stacks. The time/duration/restart/whatever depends a lot on the kind of tests and how they run (and whether or not they are running against the server at all).
The Spring stack runs the OOTB tests.. and those take 7s total (Spring round-trips the server start, too). I'm not sure that I would expect appsody test to do anything other than run the test target (so it can do whatever it does).
Would an appsody shell suffice(such that you could run appsody commands in any order within the stack environment)?

If I run mvn verify for a baisc Liberty maven project that has been warmed up (i.e. run before to download dependencies) it only takes ~8s on my machine, so as long as we get down to that ballpark time-wise I'm OK. I don't really care how we get there.
For comparison, if I run appsody test for the basic Liberty maven project that has also been warmed up, it takes 1m51s (I originally thought this was 1m because I didn't notice that 2 maven commands were being run and I just looked at the duration of the last one).
If I do an appsody test it looks like 2 commands are run:

mvn -Dmaven.repo.local=/mvn/repository install -DskipTests
../validate.sh && mvn -Dmaven.repo.local=/mvn/repository verify

A breakdown of the time shows:

11s for mvn install -DskipTests
56s for mvn verify
44s for ../validate.sh (not certain about this, but I assume it's where the remainder of the time is spent)

For "inner dev loop" activities, this needs to be much faster, ideally comparable to running bare-metal.  The only suggestion I can think of right now for improving the time is to perhaps cut out mvn install and ../validate.sh for repeated runs if pom.xml/config has not changed


[BUG] Notebooks does not obey Date Format

Describe the bug
If you change the date format in Stack Management > Advanced Settings > Date Format, Notebooks still renders the date in the MM/DD/YYYY format.
To Reproduce
Steps to reproduce the behavior:

Go to Stack Management > Advanced Settings > Date Format and change the date format to something different. I used DD MMM, YYYY @ HH:mm:ss.SSS
Go back to notebooks and create a notebook - I added a visualization.
The visualization timestamp is still in MM/DD/YYYY format

Expected behavior
Notebooks would follow the the date format.
Plugins
All standard
Screenshots
If applicable, add screenshots to help explain your problem.

We purposely chose a time format up to minutes for created/update, because the advanced settings date format is usually precise which might not be useful in this context. I'll keep it for now unless there is an objection, but I can take a look for the visualization time format


Delete saved SLAs from DB on container removal

When removing a container through the dashboard, the previously made SLA remains, so the next time it's launched, and the user goes through the SLA flow again, the new one can't be saved because "it violates the unique constraint". (Alternatively, the old one could be automatically replaced).

It seems that this happens in dev mode only when a container ends unnaturally by crashing rather than exiting. The workaround is to manually rm -rf slaStore/stadatastore.db but there may be a way to handle that and remove the SLA automatically as normal.


Close connection properly from transport closing

Fixes https://github.com/aspnet/AspNetCore/issues/17172

/azp run

contains merge conflicts

Thanks Doug! Wish the UI showed that...


Bug report: Running the project locally

Describe the bug
The bug is that cyberchef when started with npm start can not find a module called "OpModules.mjs" when accessed from Firefox in Parrot OS.
To Reproduce
Steps to reproduce the behaviour or a link to the recipe / input used to cause the bug:

Start a virtual machine with Parrot OS installed
Download latest version of the project.
Open a terminal in the project folder.
Run npm install
Run npm audit fix
Run npm start
Open Firefox and go to http://<IP_ADDRESS>:8080/
See the errors in Firefox and Terminal.

Expected behaviour
My expectation was to be able to run the project locally on my virtual machine whenever I have a slow internet connection, since it will be faster running it locally.
Screenshots

Desktop (if relevant, please complete the following information):

Host OS: macOS
Host OS Version: 11.4
Application: VMWare Fusion
Application Version: 12.1.2
Guest OS: Parrot OS
Guest OS Version: 4.11
Guest OS Browser: Firefox
Guest OS Browser Version: 78.0
Guest OS Terminal: Konsole
Guest OS Terminal Version: 20.12.3

What version of Node are you running?
From: Erik Kamph @.>
Sent: Thursday, June 3, 2021 5:16 PM
To: gchq/CyberChef @.>
Cc: Subscribed @.***>
Subject: [gchq/CyberChef] Bug report: Running the project locally (#1205)
Describe the bug
The bug is that cyberchef when started with npm start can not find a module called "OpModules.mjs" when accessed from Firefox in Parrot OS.
To Reproduce
Steps to reproduce the behaviour or a link to the recipe / input used to cause the bug:

Start a virtual machine with Parrot OS installed
Download latest version of the project.
Open a terminal in the project folder.
Run npm install
Run npm audit fix
Run npm start
Open Firefox and go to http://<IP_ADDRESS>:8080/
See the errors in Firefox and Terminal.

Expected behaviour
My expectation was to be able to run the project locally on my virtual machine whenever I have a slow internet connection, since it will be faster running it locally.
Screenshots
[Screenshot 2021-06-03 at 13 16 01]https://user-images.githubusercontent.com/48324322/120637845-af83da80-c46f-11eb-898d-0c0f73ebae7c.png
[Screenshot 2021-06-03 at 13 36 04]https://user-images.githubusercontent.com/48324322/120638666-b19a6900-c470-11eb-8b14-054a46692078.png
[Screenshot 2021-06-03 at 13 36 09]https://user-images.githubusercontent.com/48324322/120638701-bf4fee80-c470-11eb-8518-ae48d5154578.png
Desktop (if relevant, please complete the following information):

Host OS: macOS
Host OS Version: 11.4
Application: VMWare Fusion
Application Version: 12.1.2
Guest OS: Parrot OS
Guest OS Version: 4.11
Guest OS Browser: Firefox
Guest OS Browser Version: 78.0
Guest OS Terminal: Konsole
Guest OS Terminal Version: 20.12.3

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/gchq/CyberChef/issues/1205, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKWFL3K3JJBGVMAH4EIC3ITTQ7WJBANCNFSM46BQ6UEA.

Node version is 12.21.0
npm version is 7.5.2

Try downgrading to Node v10, see this issue and the README for more info.


Capact CLI doesn't support Keychain backend on macOS

Description
Cannot use macOS/OSX Keychain for storing login credentials details.
Expected behavior
By default, the macOS/OSX Keychain backend is used for credentials store on macOS.
Actual behavior
By default, the file backend is used and in "happy path" scenario, the user is prompted to enter a password for each executed command.
Investigation
We use the https://github.com/99designs/keyring lib which uses cgo under the hood for macOS/OSX Keychain. For building Capact CLI  we disabled CGO and we use upx to reduce binary size.
Links:

keychain lib: https://github.com/99designs/keyring/blob/d9b6b92e219ff56ce753cf84d4956f823d431651/keychain.go#L1
disabled CGO: https://github.com/capactio/capact/blob/main/.goreleaser.yml#L17

Possible options

Enable CGO and remove upx optimization. For example, kubectl has 50mb, and it's not optimized.
Switch to different library which doesn't use c binding. For example, https://github.com/zalando/go-keyring - check if upx will work with that

Additional info

In case of not having macOS we can use GitHub Actions macOS runner for testing or EC2 Mac instance

Proposed approach:

Check if a simple CLI with https://github.com/zalando/go-keyring#example-usage is working properly with UPX.
Missing method Keys() on zalando lib.
Solution: We should migrate it to [config](https://github.com/capactio/capact/tree/main/internal/cli/config) storage, as we still need to support capact config get-contexts. We don't need to bind it to env variable.
Missing drivers
Solution: use the zalando only with darwin build. But still support pass and file backends. Daft (really draft :D) idea here: (https://github.com/capactio/capact/compare/main...mszostok:keyring-try?expand=1)

Current status:
(1) I build example usage on macOS and use upx on it - works fine.
(2) Keys() - logic transferred to to config package as suggested (PR will be added soon)
(3) I used zalando and upx - works fine. Although, there are a couple of things to consider/improve:

zalondo uses a security binary and in case it is something wrong, return only an exit code that is not user-friendly.  Perhaps, we could make a contribution or wrap an error on our side.
in the case of using a keychain, it needed to be created first:

security create-keychain
security default-keychain -s keychain_name

Then, if everything works correctly and execute our binary, we could check if there is a new capact key in the keychain:
security dump-keychain keychain_name | grep "capact"


[Docs]

Describe the issue
A clear and concise description of what the issue is.
Screenshots
If applicable, add screenshots.
Additional context
Add any other context here.

What's the purpose of this issue?


Bug: ActionView::Template::Error

Visit link https://polarisviewcomponents.org/lookbook/inspect/text/default

fixed in https://github.com/baoagency/polaris_view_components/pull/311


Full static mode dynamic pages payload 404 errors (i18n module)

Versions

nuxt: v2.13.3
node: any

Reproduction

https://codesandbox.io/s/throbbing-feather-v7nnx
https://v7nnx.sse.codesandbox.io/about/

Additional Details

When using nuxt-i18n with full static generated mode there are still 404 errors for payload.js on dynamic pages.

Related https://github.com/nuxt/nuxt.js/issues/7559 https://github.com/nuxt/nuxt.js/issues/7648 https://github.com/nuxt/nuxt.js/issues/7622
Steps to reproduce
Check codesandbox.
About page tries to pre-fetch "_nuxt/static/1594718554/fr/test/payload.js" and gets 404 error in console log.
What is Expected?
Payload shouldn't be fetched because it wasn't generated at all.
What is actually happening?
Still 404 errors.

@Atinux here is a information that you've requested:
Github: https://github.com/divine/nuxt-payload-error
Surge: http://ceaseless-grain.surge.sh/about
Error: Uncaught SyntaxError: Unexpected token '<'  payload.js:1
Normally it's a 404 error but on surge it's unexpected token, quite interesting.
Thanks!

I'm having the same Uncaught SyntaxError: Unexpected token '<'.
I noticed that in the generated HTML files, the src of the payload.js and state.js files does not have the router base param concatenated with it (when running inside a domain directory, for example).

Yeah, i just passed all the dist html files into a shell function that concatenated the router.base and everything seems to work.

I have seen several of these 404 cases in the static folder, and in my case, the error was:
As the build process now happens in 2 steps (build and export), I was injecting the environment variables only in the first process. When the export ran, without the injected variable, it exported the last static things without the variable (in my case, the router.base).
In short: Implementation error. If you come by, check if all your environment variables are being injected in the 2 moments.

Hi @lucasvst. It seems you have another issue that causes payload not found an error with router.base option (not dynamic routes nor i18n). In that case would be much appreciated if you can make a new issue with code-sandbox reproduction.

@pi0 In fact, was not an issue. Was an implementation error (my implementation). I was not injecting my variables on export step.
I let the comment here for future users check this point before.

@Atinux @pi0 guys it's still broken, could you please reopen this issue?
Github: https://github.com/divine/nuxt-payload-error
Codesandbox: https://codesandbox.io/s/throbbing-feather-v7nnx
Surge: http://jobless-head.surge.sh/
Error: Uncaught SyntaxError: Unexpected token '<' payload.js:1
Quite interesting fact this time on surge reactivity is broken because it can't find commons.297bbcd.js:1
However, on localhost fr/test/payload.js net::ERR_ABORTED 404 (Not Found), also the same error on codesanbox as well.
Thanks!

@Atinux @pi0  any update?

I've updated with latest version on Github, CS and Surge link is http://careful-money.surge.sh/about/

So there is currently no way to use i18n in a full static app ?
Should have read this before translating the entire app..

I actually have the same issue without using i18n.
I use the full static mode but have several fully dynamic pages which are not statically pre-rendered. For these pages, the payload.js get requested but there's obviously a kinda 404 error (Uncaught SyntaxError: Unexpected token '<').

I have the same issue than @felixheck, full static website with a link to a dynamic page (37M possible routes so no pre-rendering possible).
My NuxtLink's redirecting to this dynamic pages have the no-prefetch attribute but a /payload.js request is still triggered on click, resulting in 404 and then successfully loading the dynamic page, but it takes extra time (waiting for the 404 to happen).

having the same issue as @felixheck @nicolasbeauvais, and no-prefetch also doesn't work for me.

Related #7717

Hi there,
We are aware of this issue but this one is a bit tricky since we actually need to generate a manifest to know what routes has been statically generated (vs ignored), this manifest can have a huge size based on the number of generated route and also affect performances.
This does not mean we cannot solve it but we have to take the right decision about it.

Does anyone have an interim work around? Have attached what I'm getting...

Does anyone have an interim work around? Have attached what I'm getting...

There is no known work around for this problem.
Thanks!

i am sorry.i can't speak english
I have a similar problem.
npm run build generated file
npm run start run file
It show  route/payload.js  net::ERR_ABORTED 404 (Not Found) in console.
I just load the route and it appears
Is there a problem with my WebPack configuration?(default configuration )
Versions

nuxt: v2.14.1
node: any

thank you very much for seeing this question.
Thanks!

Hi folks! I am getting exactly the same result.

Nuxt: 2.14.6
Target: static

Hi.
I'm having the same issue.
How can I prevent those errors to be displayed? We didn't have that error before but we added GTM to the project so we had to update Nuxt version and after that update we came across this issue.
If someone has a work around for this issue please post it here!
The issue happens as soon as I build a link for a dynamic page. I'll try the no-prefetch feature for the links but it will happen again once I get into the dynamic page.

Nuxt 2.14.6
Target: static

@Atinux any update on this? I can understand this might be not a priority but until nuxt 3 release this is really bugging everyone.
Thanks!

I will look at this ASAP

I found a stable workaround for those of you that use Vercel by leveraging the edge-network caching (Serverless Pre-Rendering), I think it's a good compromise between SSR and static generation that should work for most use cases.
Nuxt.js config
You need to deploy your app with a server target, and exclude all pages that you do not want to be statically generated by Nuxt.js (routes that can render thousands of different pages should in most case be excluded):
// nuxt.config.js
export default {
  target: 'server',

  generate: {
    exclude: [
      /^\/dynamic-route\//,
    ]
  },
}

Vercel config
Now as we are deploying in server mode, we need to use @nuxtjs/vercel-builder to run our code on Vercel. By using the generateStaticRoutes option, all non excluded pages will be statically rendered at build time. For the dynamic pages that we excluded, adding the Cache-Control: s-maxage=43200, stale-while-revalidate will tell Vercel to cache all server-side-rendered pages for 12h, if the cache is expired, Vercel will send the last saved version of the page to the client while simultaneously updating the cache in the background. More info on Vercel caching strategy here.
{
  "version": 2,
  "builds": [
    {
      "src": "nuxt.config.js",
      "use": "@nuxtjs/vercel-builder",
      "config": {
        "generateStaticRoutes": true
      }
    }
  ],
  "headers": [
    {
      "source": "/(.*)",
      "headers" : [
        {
          "key" : "Cache-Control",
          "value" : "s-maxage=43200, stale-while-revalidate"
        }
      ]
    }
  ]
}

This solution has a tiny performance cost, but the increased flexibility between static and dynamic is totally worth it.

Awesome! Thanks for sharing @nicolasbeauvais

Hi all, I'm having a similar problem around payloads, if there's a more relevant issue let me know, but:

when I generate dynamic routes with target: "static" in my nuxt.config.js the routes don't seem to accept their payload, and
when I don't use target: "static" the head() methods I include on those dynamic routes aren't included in the index.html for those routes (as found in dist after generate)

I've documented better in SO questions here:
1 - https://stackoverflow.com/questions/64148659/nuxtjs-dynamic-routes-not-accepting-payload-when-full-static
2 - https://stackoverflow.com/questions/64147401/in-nuxtjs-will-dynamic-route-head-tags-populate-for-seo
If anyone could give me pointers to address either problem, that'd be amazing, let me know if I need to open a new issue, thanks!

@Sford4 sorry but I don't think that SO is a better place to document it.
You'd better writing it here because actual developers of nuxt are here. 😉

@divine sounds good, here's the write up:
When I run nuxt generate, I create routes like so:
***nuxt.config.js***

generate: {
    routes() {
      return axios
        .get(`${process.env.ROOT_URL}/businesses`)
        .then(res => {
          return res.data.map(business => {
            return {
              route: `/business/${business.id}`,
              payload: business
            };
          });
        });
     }
}

This successfully creates my dynamic routes, which accept a payload from generation.  Each route should have their own headers, from my business component:
***business.vue***

async asyncData({ params, store, error, payload }) {
    if (payload) {
      console.log('GOT PAYLOAD!', payload)
      return { business: payload };
    } else {
      // other stuff
    }
})
...
...
...
head() {
    return {
      title: this.business.name,
      meta: [
        {
          hid: `businessPageDescription-${this.business.id}`,
          name: "description",
          content: this.business.description,
        },
        {
          hid: `businessPageKeywords-${this.business.id}`,
          name: "keywords",
          content: this.business.keywords,
        },
      ],
    };
  },

During nuxt generate with target: "static" on in my nuxt.config.js, the console.log above is hit for each dynamic route, so I know it's receiving its correct payload in asyncData.
After nuxt generate my dist folder has a subfolder for each dynamic route, but the index.html for each has only a few lines inside , and when I visit the page for each on the browser no content specific to the dynamic route appears (the navbar from my layout component comes up fine).
Navigation in-app works fine, so if I go to a different page and come page to my dynamic route content will appear, so asyncData works, accepting the payload is the trouble.
Without target: "static" things work as expected, the index.html for each in dist has plenty in it, and the page loads the desired content when visited, although the head() method in business.vue is not generated (it will populate on the client when the component mounts).
Question 1: Any ideas how to get my full static business pages to accept and hold onto their payload?
Question 2: My whole goal is to prep my dynamic routes for SEO, so the head() method NOT working during generate in either scenario concerns me (right now the  tags are filled with defaults from my nuxt.config.js), will crawlers still get my dynamic content for SEO purposes either when I use target: "static" or not?
Again, let me know if I need to raise a new issue, or if there's another forum where I can get help.  Thank you so much!

We're experiencing the same, our payloads which are triggered by nuxt-links just contain the rendered / page. Looking forward to a solution!

Same error:
<nuxt-link :to="`/boards/${board.id}`" >View</nuxt-link>

Since board.idis dynamic and it doesn't get generated in the routes the payload returns a 404 causing the Uncaught SyntaxError: expected expression, got '<' error.
I think that there should be a way to catch these errors for dynamic routes

This issue seems to have been raised multiple times since June and then closed (#7559 #7622 #7648), once tagged "available soon".
Is there a solution or a workaround?

Error: Uncaught SyntaxError: Unexpected token '<' payload.js:1
Normally it's a 404 error but on surge it's unexpected token, quite interesting.

@divine Surge rewrites all URLs that don't have a corresponding static file to /200.html. So, the error is different because a request for "payload.js" is returned, but it is not a javascript file that was expected.

Error: Uncaught SyntaxError: Unexpected token '<' payload.js:1
Normally it's a 404 error but on surge it's unexpected token, quite interesting.

@divine Surge rewrites all URLs that don't have a corresponding static file to /200.html. So, the error is different because a request for "payload.js" is returned, but it is not a javascript file that was expected.

I know, but it's pretty lame to redirect .js files at least. Showing error is important instead of giving plain 200.html content.
Anyways let's keep discussion going on actual issue:

This issue seems to have been raised multiple times since June and then closed (#7559 #7622 #7648), once tagged "available soon".
Is there a solution or a workaround?

Workaround is to use server mode instead of static one. As I remember you were using Firebase so basically there is no resolution.
@Atinux any updates?
Thanks!

Not a solution, but a simple patch to the issue for me was to create a noop payload.js file, and then rewrite all requests to non-existent payload.js to it:
{
  "source": "/admin/**/payload.js",
  "destination": "/payload.js"
}

Back to the solution:
My understanding that payload.js is related to "Smart Prefetching". Is this correct? If so, is there any way to opt out of it?
 Or maybe make the prefetch smarter by not prefetching the payload if it is known at build time to be empty?

Same issue, deploying to netlify. Using PWA it immediately happens on opening of the app when the loading screen is shown. The website in browser occasionally has the error issue. I am not yet able to consistently reproduce it locally 🤔

Current workaround
Clear your site data via chrome inspect devices.
@divine can you reproduce it following my steps?
But what's the real cause for pointing to the old js files? Is it a workbox cache issue?

@Anima-t3d I think you're missing the point that the error happens on dynamic link routes which were'nt generated initially.
Basically your workaround doesn't solve it.

I will look at this ASAP

Any update on this @Atinux ?

Working on a workaround :)

Not sure it's directly related, but when I enable no sniffing of the content type I get a slight variation of the error:
Refused to execute script from '...payload.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

@Anima-t3d I think you're missing the point that the error happens on dynamic link routes which were'nt generated initially.

Seems like the issue I have is caused by: https://github.com/nuxt-community/pwa-module/issues/381
So although the symptoms are the same the cause seems to be different, just thought to add here for others who end up here.

I've had the same problems with 404 errors for payloads on dynamic pages. These all disappeared when using<EMAIL_ADDRESS>Thank you!

Can confirm that my problems has also been fixed in v2.14.8 - thanks so much 🙏

I had the payload.jsgiving me an Unexpected token '<'. Since I updated Nuxt to v2.14.8, it's manifest.js that causes the error.
Uncaught SyntaxError: Unexpected token '<'  manifest.js:1

I had the payload.jsgiving me an Unexpected token '<'. Since I updated Nuxt to v2.14.8, it's manifest.js that causes the error.
Uncaught SyntaxError: Unexpected token '<'  manifest.js:1

Have you gotten any solution for this issue? I am getting this error, my nuxt version 2.15.7

I had the payload.jsgiving me an Unexpected token '<'. Since I updated Nuxt to v2.14.8, it's manifest.js that causes the error.
Uncaught SyntaxError: Unexpected token '<'  manifest.js:1

@jeerbl have you gotten any solution for this issue? I am getting this error, my nuxt version 2.15.7

Same issue here.

Yeah, I just passed all the dist html files into a shell function that concatenated the router.base and everything seems to work.

Hey! Could you show me how did you do that please?