graph constantly re-rendering even when app is idle?

i noticed that my project was feeling laggy. i put a log into the graph's render function, and noticed that it was re-rendering constantly. it's consuming a lot of CPU power and that was why i observed the lagginess.
i tried not doing anything, and the re-rendering would stop after some time. however, even when i performed actions unrelated to the graph and the data being fed to the graph, the rendering would begin again. sometimes when idle it seemed to be re-rendering indefinitely.
is this normal/expected behaviour? i could understand if i was manipulating data that was being fed back into the graph, in which case of course re-rendering makes sense. but, as mentioned,  re-rendering seems to occur when i am doing things completely unrelated, and when i'm not doing anything at all.
here's a gif where you can see in the dev tools that the count of 'graph render' logs is just going up and up, even though i'm not doing anything.

update: i rolled the code back really far and have found a point at which this doesn't happen. will try debug it myself - doesn't seem to be an issue with the library!


lib/tests/formulae*: unset HOMEBREW_GIT_PATH for git dependents

During formula build or test, we need to unset HOMEBREW_GIT_PATH if the formula in question has a depends_on "git", otherwise it will continue to prioritise system git in the PATH.
In these scenarios, it is also safe to assume brewed git is functional, otherwise something's already broken and the build/test is going to fail anyway.

The conditions differ for a couple so it’s not 4 identical blocks but yeah that makes sense.

On 27 Sep 2021, at 12:40, Mike McQuaid @.***> wrote:

@MikeMcQuaid commented on this pull request.
In lib/tests/formulae.rb:

   env = {}

   env["HOMEBREW_GIT_PATH"] = nil if deps.any? do |d|

     d.name == "git" && (!d.test? || d.build?)

   end

Could this get pulled into a function that takes deps as an argument and returns env? It's used in 4 places.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.


poor formatting of the r session switch msg box

the R interp name is split in the middle
it's easier to read if key info is on separate lines (especially since remote names might be long)

ie:
Are you sure you want to switch from:
   Microsoft R client (3.3.2)
To:
   RTVS-DevServer1 ?
<blank line>
Switching will stop your current session....

This prompt can be suppressed ...

https://github.com/Microsoft/RTVS/commit/47aea657ddcba93ecede67a555f4f01015b557be


MO: Bail out when PS version is lower than 1.7

In my opinion, it won't prevent the blank page cause by a parsing error (not execution) with the use statement on PHP < 5.3. It will just prevent 1.6 PrestaShop running on PHP >= 5.3 from installing the module which is already prevented with the ps_versions_compliancy.
So I close this PR waiting for a better solution.
Thanks


AttributeError: module 'xclim.ensembles' has no attribute 'robustness_fractions'

Setup Information

Xclim version: 0.45.14-beta
Python version: 3.11.6
Operating System: Linux

Context
I wanted to apply robustness analysis from the xclim.ensembles package but I'm getting the error 'module xclim.ensemble' has no attribute 'robustness_fractions'. I have 3 members of an ensamble and want to test the same method as in the online tutorial with the example command 'fractions = 'xclim.ensembles._robustness.robustness_fractions)(fut, ref, test="ipcc-ar6-c")
fractions' but I run into the mentioned error. I have followed the ensemble analysis tutorial using my data (statistics, percentile analysis and plotting) and all worked fine until the most important section of robustness analysis. Any guidance is much appreciated.
Code of Conduct

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

Updating to v0.47 should solve this .  robustness_fractions is a recent addition https://github.com/Ouranosinc/xclim/releases/tag/v0.47.0

Thank you very much to both of you, happy that the solution was that simple. Cheers


Xcode 8.3 and Swift 3.1 support

Changed M_PI and M_PI_4 to Double.pi and Double.pi / 4 to support Xcode 8.3 and Swift 3.1 changes.

@sudeepag any update on when you will merge this?

@saldous your branch has several error apparently :(

Odd, as you can see I only changed 2 lines of code!

Would you change those errors please?

Don't want to hijack your efford & work :) I should've a running version here:
https://github.com/ctews/SAConfettiView
maybe your can merge in those changes into your PR branch! :)

import UIKit
import QuartzCore

open class SAConfettiView: UIView {

    public enum ConfettiType {
        case confetti
        case triangle
        case star
        case diamond
        case image(UIImage)
    }

    var emitter: CAEmitterLayer!
    open var colors: [UIColor]!
    open var intensity: Float!
    open var type: ConfettiType!
    fileprivate var active :Bool!

    required public init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        setup()
    }

    public override init(frame: CGRect) {
        super.init(frame: frame)
        setup()
    }

    func setup() {
        colors = [UIColor(red:0.95, green:0.40, blue:0.27, alpha:1.0),
                  UIColor(red:1.00, green:0.78, blue:0.36, alpha:1.0),
                  UIColor(red:0.48, green:0.78, blue:0.64, alpha:1.0),
                  UIColor(red:0.30, green:0.76, blue:0.85, alpha:1.0),
                  UIColor(red:0.58, green:0.39, blue:0.55, alpha:1.0)]
        intensity = 0.5
        type = .confetti
        active = false
    }

    open func startConfetti() {
        emitter = CAEmitterLayer()

        emitter.emitterPosition = CGPoint(x: frame.size.width / 2.0, y: 0)
        emitter.emitterShape = kCAEmitterLayerLine
        emitter.emitterSize = CGSize(width: frame.size.width, height: 1)

        var cells = [CAEmitterCell]()
        for color in colors {
            cells.append(confettiWithColor(color))
        }

        emitter.emitterCells = cells
        layer.addSublayer(emitter)
        active = true
    }

    open func stopConfetti() {
        emitter?.birthRate = 0
        active = false
    }

    func imageForType(type: ConfettiType) -> UIImage? {

        var fileName: String!

        switch type {
        case .confetti:
            fileName = "confetti"
        case .triangle:
            fileName = "triangle"
        case .star:
            fileName = "star"
        case .diamond:
            fileName = "diamond"
        case let .image(customImage):
            return customImage
        }

        let path = Bundle(for: SAConfettiView.self).path(forResource: "SAConfettiView", ofType: "bundle")
        let bundle = Bundle(path: path!)
        let imagePath = bundle?.path(forResource: fileName, ofType: "png")
        let url = URL(fileURLWithPath: imagePath!)
        let data = try? Data(contentsOf: url)
        if let data = data {
            return UIImage(data: data)!
        }
        return nil
    }

    func confettiWithColor(_ color: UIColor) -> CAEmitterCell {
        let confetti = CAEmitterCell()
        confetti.birthRate = 6.0 * intensity
        confetti.lifetime = 14.0 * intensity
        confetti.lifetimeRange = 0
        confetti.color = color.cgColor
        confetti.velocity = CGFloat(350.0 * intensity)
        confetti.velocityRange = CGFloat(80.0 * intensity)
        confetti.emissionLongitude = CGFloat(Double.pi)
        confetti.emissionRange = CGFloat(Double.pi / 4)
        confetti.spin = CGFloat(3.5 * intensity)
        confetti.spinRange = CGFloat(4.0 * intensity)
        confetti.scaleRange = CGFloat(intensity)
        confetti.scaleSpeed = CGFloat(-0.1 * intensity)
        confetti.contents = imageForType(type)!.cgImage
        return confetti
    }

    open func isActive() -> Bool {
        return self.active
    }
}


Feature Request: After running the experiments, automatically create a Jupyter instance to visualize the results

By running python trainval.py -e {experiment_group} -sb {savedir_base} a lot of experiments get launched and their results are saved in {savedir_base}.
However, we would like to automatically create a jupyter notebook and an instance that can output our implemented jupyter widget as the one below to allow the user to visualize the results as they are running

done it's in the hw.run_wizard function


[H001057] Rep. Tim Huelskamp

Rep. Tim Huelskamp:
http://huelskamp.house.gov
Likely contact form URL to start with:
https://forms.house.gov/huelskamp/webforms/zipauthen_contact.shtml

YAML file lost. I am working on it.


Update to CodeNarc 1.2.1

This PR updates to CodeNarc 1.2.1, which fixes some bugs with indentation. As such, the version number is being bumped to 0.4.0, since indentation will now be enforced. Also, line length with now be enforced to 90 characters (instead of the default 120).
Fixes https://github.com/AbletonAppDev/devtools/issues/671, ping @AbletonDevTools/gotham-city

LGTM :+1:


Submit annotations directly with HTTP

I'm not sure yet if this is a good idea, but this branch submits annotations directly via HTTP instead of using the buildkite-agent. I was struggling to get the buildkite-agent binary into a Docker Compose stack, so am trying this out of frustration.
It is potentially breaking -- I had to allow agent.buildkite.com in WebMock in my test suite to allow this to work.

Small bump to say that this change would be appreciated. Unfortunately, the mount-buildkite-agent does not seem to work for docker-in-docker. The workaround I found is manually installing the agent, which wastes a couple of seconds


E2503 Attribute "routing.http.preserve_host_header.enabled" for ElasticLoadBalancingV2::LoadBalancer

cfn-lint version: cfn-lint 0.61.4
Description of issue.
cfn-lint gives me:
2503 Attribute "routing.http.preserve_host_header.enabled" not allowed for load balancers with type "application"
whereas https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-loadbalancerattributes.html in Properties says this is possible for application load balancers - deployment works, but the linter throws the above error.
I guess this is similar to https://github.com/aws-cloudformation/cfn-lint/issues/2100

Proposed removing this hardcoding since that rule has some of the most churn because of it:
https://github.com/aws-cloudformation/cfn-lint/pull/2184


cmake options USE_TLS_V1_2 and USE_TLS_V1_3 have no effect

Describe the bug
The recently added cmake configure options USE_TLS_V1_2 and USE_TLS_V1_3 have no effect
https://github.com/aws/aws-sdk-cpp/pull/2604
There are three issues:

cmake -L lists USE_TLS_V1_2 and USE_TLS_V1_3 options, which have no effect as CMakeLists.txt checks for USE_TLS_V2 and USE_TLS_V3
the conditionally compiled code in CurlHttpClient.cpp has no effect with current versions of curl 8 since LIBCURL_VERSION_MINOR would be <34.  For curl version range checks LIBCURL_VERSION_NUM might be a better choice https://curl.se/docs/versions.html
CURL_SSLVERSION_TLSv1_3 is available as of curl 7.52 according to curl documentation https://curl.se/libcurl/c/CURLOPT_SSLVERSION.html

Expected Behavior
using the cmake options should enforce the desired TLS version for the selected client
Current Behavior
cmake options USE_TLS_V1_2 and USE_TLS_V1_3 have no effect
Reproduction Steps
cmake <path_to_sdk_source> -DCMAKE_INSTALL_PREFIX=<install_dir> -DBUILD_ONLY=core -DENABLE_TESTING=OFF -DBUILD_SHARED_LIBS=ON -DFORCE_CURL=ON -DCURL_LIBRARY=<path_to_curl_lib> -DCURL_INCLUDE_DIR=<path_to_curl_include> -DUSE_TLS_V1_3=ON
cmake --build . --config=Debug
void UploadFile(const std::string& access_key_id, const std::string& secret_key, const std::string bucket_name, const std::string key_name, std::shared_ptrstd::fstream file_stream)
{
Aws::S3::S3ClientConfiguration config;
config.scheme = Aws::Http::Scheme::HTTPS;
config.region = "us-east-2";
Aws::S3::S3Client client(Aws::Auth::AWSCredentials(access_key_id, secret_key), config, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy::RequestDependent, false);
Aws::S3::Model::PutObjectRequest put_object_request;
put_object_request.SetBucket(bucket_name);
put_object_request.SetKey(key_name);
put_object_request.SetBody(file_stream);
auto outcome(client.PutObject(put_object_request));
std::cout << "Put " << (outcome.IsSuccess() ? "succeeded" : "failed") << std::endl;
}
put brake point before #if defined(ENFORCE_TLS_V1_3) in CurlHttpClient.cpp and see that CURL_SSLVERSION_TLSv1_3 option is not set.  Repeat the same for V1_2.
Possible Solution
No response
Additional Information/Context
No response
AWS CPP SDK version used
1.11.159
Compiler and Version used
Visual Studio 2022
Operating System and version
windows 10

Hey sorry about that, pushing out a change that should address your problems

closing issue ad it was released and tagged give a shout if you have anymore questions


feat: support mochawesome4 and test mochawesome merge

fixes #93 #92

travis tests failing because coveralls appears to be down!


Bug: Crash after trying to delete files from search results

Description
So I switched to files after being tried of MS Explorer hiccups and shenanigans, but Files has some of its own imperfections.
App hung up on a process of deleting txt files found via search bar, after it crashed at least ~~280 of them were actually deleted but they weren't transfer to bin.
just checked, it happens with other type of files too.
Steps To Reproduce

Create around 25500 txt files with varying degree of size and complexity, scattered around different folders on the same drive,
Try to first find them through search function then delete them,
Watch world burn.

Requirements
Stopped responding and crashed after trying to delete 25500 .txt files.
Files Version
<IP_ADDRESS>
Windows Version
10.0.22631.3737
Log File
debug.log

Thanks for the report, I've added this to the project board.

Isn't this the same issue as #14108?


Documentation on listening to port 80?

Version 1.4
I'm a beginner and tried using
node_listen: 80

in   conf/config.yaml. The objective is simply to use APISIX for a publicly available home page.
 sudo ./bin/apisix start`

errors with
2020/07/23 11:17:24 [error] 26714#0: init_worker_by_lua error: ...er/programs/apache-apisix-1.4-incubating/apisix/init.lua:72: module 'resty.worker.events' not found:
        no field package.preload['resty.worker.events']
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/share/lua/5.1/resty/worker/events.lua'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/share/lua/5.1/resty/worker/events/init.lua'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating/resty/worker/events.lua'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating/resty/worker/events/init.lua'
        no file '/usr/local/openresty/site/lualib/resty/worker/events.ljbc'
        no file '/usr/local/openresty/site/lualib/resty/worker/events/init.ljbc'
        no file '/usr/local/openresty/lualib/resty/worker/events.ljbc'
        no file '/usr/local/openresty/lualib/resty/worker/events/init.ljbc'
        no file '/usr/local/openresty/site/lualib/resty/worker/events.lua'
        no file '/usr/local/openresty/site/lualib/resty/worker/events/init.lua'
        no file '/usr/local/openresty/lualib/resty/worker/events.lua'
        no file '/usr/local/openresty/lualib/resty/worker/events/init.lua'
        no file './resty/worker/events.lua'
        no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/resty/worker/events.lua'
        no file '/usr/local/share/lua/5.1/resty/worker/events.lua'
        no file '/usr/local/share/lua/5.1/resty/worker/events/init.lua'
        no file '/usr/local/openresty/luajit/share/lua/5.1/resty/worker/events.lua'
        no file '/usr/local/openresty/luajit/share/lua/5.1/resty/worker/events/init.lua'
        no file '/usr/share/lua/5.3/resty/worker/events.lua'
        no file '/usr/share/lua/5.3/resty/worker/events/init.lua'
        no file '/usr/lib/lua/5.3/resty/worker/events.lua'
        no file '/usr/lib/lua/5.3/resty/worker/events/init.lua'
        no file './resty/worker/events.lua'
        no file './resty/worker/events/init.lua'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib64/lua/5.1/resty/worker/events.so'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib/lua/5.1/resty/worker/events.so'
        no file '/usr/local/openresty/site/lualib/resty/worker/events.so'
        no file '/usr/local/openresty/lualib/resty/worker/events.so'
        no file './resty/worker/events.so'
        no file '/usr/local/lib/lua/5.1/resty/worker/events.so'
        no file '/usr/local/openresty/luajit/lib/lua/5.1/resty/worker/events.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/usr/lib/lua/5.3/resty/worker/events.so'
        no file '/usr/lib/lua/5.3/loadall.so'
        no file './resty/worker/events.so'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib64/lua/5.1/resty.so'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib/lua/5.1/resty.so'
        no file '/usr/local/openresty/site/lualib/resty.so'
        no file '/usr/local/openresty/lualib/resty.so'
        no file './resty.so'
        no file '/usr/local/lib/lua/5.1/resty.so'
        no file '/usr/local/openresty/luajit/lib/lua/5.1/resty.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/usr/lib/lua/5.3/resty.so'
        no file '/usr/lib/lua/5.3/loadall.so'
        no file './resty.so'
stack traceback:
        [C]: in function 'require'
        ...er/programs/apache-apisix-1.4-incubating/apisix/init.lua:72: in function 'http_init_worker'
        init_worker_by_lua:2: in main chunk

I read this issue
#https://github.com/apache/incubator-apisix/issues/1693
where it says that nginx shouldn't be run as root.
I read some forum posts, e.g.
https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443
and tried using
sudo setcap CAP_NET_BIND_SERVICE=+ep /usr/local/openresty/nginx/sbin/nginx

This works. I also have control over my firewall and could do port remapping. Another suggesting in that forum post is authbind, which I have not tried.
Do the APISIX developers suggest a specific way? Or should this already work with sudo, and maybe I have not understood how to do it? Is port remapping via iptables the best way?
Thanks!

How did you install Apache APISIX? Seems like Apache APISIX can't find the dependency: resty.worker.events

Thanks for your help! To make it more reproducible I re-installed and attached an install script below. This installs to an unpriviliged user's home directory (note the configure --prefix for openresty and luarocks in the install script).
This works without error:
./bin/apisix start

But
sudo ./bin/apisix start

results in (cat logs/error.log)
2020/07/24 09:31:03 [error] 11080#0: init_worker_by_lua error: ...er/programs/apache-apisix-1.4-incubating/apisix/init.lua:72: module 'resty.worker.events' not found:
        no field package.preload['resty.worker.events']
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/share/lua/5.1/resty/worker/events.lua'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/share/lua/5.1/resty/worker/events/init.lua'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating/resty/worker/events.lua'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating/resty/worker/events/init.lua'
        no file '/home/labuser/programs/openresty_install/site/lualib/resty/worker/events.ljbc'
        no file '/home/labuser/programs/openresty_install/site/lualib/resty/worker/events/init.ljbc'
        no file '/home/labuser/programs/openresty_install/lualib/resty/worker/events.ljbc'
        no file '/home/labuser/programs/openresty_install/lualib/resty/worker/events/init.ljbc'
        no file '/home/labuser/programs/openresty_install/site/lualib/resty/worker/events.lua'
        no file '/home/labuser/programs/openresty_install/site/lualib/resty/worker/events/init.lua'
        no file '/home/labuser/programs/openresty_install/lualib/resty/worker/events.lua'
        no file '/home/labuser/programs/openresty_install/lualib/resty/worker/events/init.lua'
        no file './resty/worker/events.lua'
        no file '/home/labuser/programs/openresty_install/luajit/share/luajit-2.1.0-beta3/resty/worker/events.lua'
        no file '/usr/local/share/lua/5.1/resty/worker/events.lua'
        no file '/usr/local/share/lua/5.1/resty/worker/events/init.lua'
        no file '/home/labuser/programs/openresty_install/luajit/share/lua/5.1/resty/worker/events.lua'
        no file '/home/labuser/programs/openresty_install/luajit/share/lua/5.1/resty/worker/events/init.lua'
        no file '/usr/share/lua/5.3/resty/worker/events.lua'
        no file '/usr/share/lua/5.3/resty/worker/events/init.lua'
        no file '/usr/lib/lua/5.3/resty/worker/events.lua'
        no file '/usr/lib/lua/5.3/resty/worker/events/init.lua'
        no file './resty/worker/events.lua'
        no file './resty/worker/events/init.lua'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib64/lua/5.1/resty/worker/events.so'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib/lua/5.1/resty/worker/events.so'
        no file '/home/labuser/programs/openresty_install/site/lualib/resty/worker/events.so'
        no file '/home/labuser/programs/openresty_install/lualib/resty/worker/events.so'
        no file './resty/worker/events.so'
        no file '/usr/local/lib/lua/5.1/resty/worker/events.so'
        no file '/home/labuser/programs/openresty_install/luajit/lib/lua/5.1/resty/worker/events.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/usr/lib/lua/5.3/resty/worker/events.so'
        no file '/usr/lib/lua/5.3/loadall.so'
        no file './resty/worker/events.so'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib64/lua/5.1/resty.so'
        no file '/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib/lua/5.1/resty.so'
        no file '/home/labuser/programs/openresty_install/site/lualib/resty.so'
        no file '/home/labuser/programs/openresty_install/lualib/resty.so'
        no file './resty.so'
        no file '/usr/local/lib/lua/5.1/resty.so'
        no file '/home/labuser/programs/openresty_install/luajit/lib/lua/5.1/resty.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/usr/lib/lua/5.3/resty.so'
        no file '/usr/lib/lua/5.3/loadall.so'
        no file './resty.so'
stack traceback:
        [C]: in function 'require'
        ...er/programs/apache-apisix-1.4-incubating/apisix/init.lua:72: in function 'http_init_worker'
        init_worker_by_lua:2: in main chunk

In the github issue referenced above, a user said that nginx is nobody when apisix is started with sudo, and so it doesn't have permissions to read the lua configuration (if I understand correctly).

################################################

REL=luarocks-3.3.1

wget -nc https://luarocks.org/releases/$REL.tar.gz
tar zxpf $REL.tar.gz
rm -r luarocks_install ||:
mkdir luarocks_install
cd $REL
./configure --prefix=$BASE/luarocks_install
make
sudo make install

cd ..

# #####################################################################
cd $BASE
wget -nc http://www.apache.org/dist/incubator/apisix/1.4/apache-apisix-1.4-incubating-src.tar.gz
tar zxvf apache-apisix-1.4-incubating-src.tar.gz
cd apache-apisix-1.4-incubating
make deps

you need to install APISIX to /usr/local/apisix, and set right access permissions. then you can start the APISIX with sudo.
the user is nobody by default if you start APISIX with sudo, from the error log, it is caused by not having permission to read the file.


Cirq routing is hanging again for some circuits

Hi guys,
I have a concern similar to the one from issue #2282. The problem was fixed later and when running from 6d81ddbb commit everything works just fine. However, there were further changes in apply_next_swaps(...) function, in particular a new parameter max_num_empty_steps was introduced.
In the last version of code when running routing via route_circuit_greedily(...) and with parameters max_search_radius=1, max_num_empty_steps=1 everything also works well. However, when choosing different values for these two parameters (e.g. max_search_radius=2, max_num_empty_steps=1) routing hangs on some circuit instances.
Should there be any constraint on how to choose values for the parameters max_search_radius and max_num_empty_steps? Or maybe there is some bug in the routing code?
Thanks!

@bryano I think you added this feature.  Thoughts?

@wcourtney Could you provide some circuits (or code to generate them) on which the router hangs?

This is the code snippet.
It works fine if number of qubits involved in the random circuit <16 (number of qubits in the hardware is 16) or for small value of n_moments.
import networkx as nx
import cirq
from cirq import LineQubit
from cirq.contrib.routing.greedy import route_circuit_greedily

edges = [
        [0, 1],
        [0, 7],
        [0, 15],
        [1, 2],
        [7, 6],
        [7, 8],
        [15, 8],
        [15, 14],
        [2, 3],
        [3, 4],
        [4, 5],
        [5, 6],
        [8, 9],
        [9, 10],
        [10, 11],
        [11, 12],
        [12, 13],
        [13, 14],
        ]

def create_cirq_hardware(edges):
    graph = nx.Graph()
    for edge in edges:
        graph.add_edges_from([(LineQubit(edge[0]), LineQubit(edge[1]))])
    return graph

cirq_hardware = create_cirq_hardware(edges)
circuit = cirq.testing.random_circuit(qubits=16, n_moments=200,
                                      op_density=.5, random_state=1)

swap_network = route_circuit_greedily(circuit,
                                      cirq_hardware,
                                      max_search_radius=2,
                                      max_num_empty_steps=1,
                                      random_state=1)

This is definitely odd:
In colab works up to 8 qubits (~ 1 minute at that point) and then it hangs (it's been running for 12+ minutes now).

This is definitely odd:
In colab works up to 8 qubits (~ 1 minute at that point) and then it hangs (it's been running for 12+ minutes now).

I think I managed to fix the issue by modifying function apply_next_swaps(...) in greedy router. In fact these changes were implemented earlier to fix such a problem and then for some reason were reverted.
See this screenshot:

After modifying apply_next_swaps(...) in Cirq. 0.8.2 router works fine! Should I create a pool request with the changes?
This is the modified version of apply_next_swaps(...) function:
`    def apply_next_swaps(self, require_frontier_adjacency: bool = False):
"""Applies a few SWAPs to get the mapping closer to one in which the
next logical gates can be applied.
    See route_circuit_greedily for more details.
    """

    time_slices = get_time_slices(self.remaining_dag)

    if require_frontier_adjacency:
        frontier_edges = sorted(time_slices[0].edges)
        self.bring_farthest_pair_together(frontier_edges)
        return

    for k in range(1, self.max_search_radius + 1):
        candidate_swap_sets = list(self.get_edge_sets(k))
        for time_slice in time_slices:
            edges = sorted(time_slice.edges)
            distance_vectors = list(
                self.get_distance_vector(edges, swap_set)
                for swap_set in candidate_swap_sets)
            dominated_indices = _get_dominated_indices(distance_vectors)
            candidate_swap_sets = [
                S for i, S in enumerate(candidate_swap_sets)
                if i not in dominated_indices
            ]
            if len(candidate_swap_sets) == 1:
                self.apply_swap(*candidate_swap_sets[0])
                if list(
                        self.remaining_dag.findall_nodes_until_blocked(
                            self.acts_on_nonadjacent_qubits)):
                    return
                else:
                    break

    self.apply_next_swaps(True)`

Submitted PR #3360

Was fixed in #3360.


Hide secret values on S3 Config inspect

Hi there 😊
This PR hides some values containing potential secrets when inspecting S3.Config struct, what do you think?
Obrigado, cheers!

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:


Unbonding period

[x] undelegation restricted to one per transaction (change code and schema to reflect this)
[ ] implement unbonding period at epoch boundaries (refer to #375 for details about the state machine here)
[ ] fetch quarantined notes in CompactBlock requests (and handle them in pcli

Closing in favor of #427.


WSL terminal crashes when using tmux

If I open a tmux session and then use the shortcut "Ctrl+b + %" to add a new vertical window it displays properly. However if I maximize the terminal and then minimize it again to its original size the terminal will freeze for a second and then close without appearing any error message.
This behaviour only happens with vertical windows, and not with horizontal ones.
I don't know if it's a problem of the WSL terminal or tmux itself. I'm new to developping in Windows, so where can I find the log or any information to let you know what is happening with the terminal?
EDIT: I just find out that it happens with tmux and only when you minimize back to its size a terminal which contains many lines or rows. For example if I go to /usr/bin/ and type "ls -l" all the content will show in screen; if I maximize the window then minimize it back to its default size it will crash and close without showing any error. If I do the same operation out of tmux, it displays without any error.

tmux works fine for me... the font spacing is driving me nuts though.  There's a space between my nerdfont glyphs that's driving me a little crazy...

But this is a MASSIVE improvement over what was there.

Is what it should be.

Allthough, the terminal is REALLY slow, like typing on a 9600 baud modem connection while attached to the tmux session. I'm going to compile tmux 3.0 and see if it's still slow and debug it. I'll open a bug on another thread if I figure anything out. I'm curious is luis has that same experience too...

For reference I was unable to duplicate this crash this with both a horizontal tmux split and a vertical tmux split. TMUX 2.1 - Terminal Version: 0.4.2382.0 which I got from the MS store. Probably should have started with this but it's insane to me to be able to work in windows comfortably, got carried away. btw the screenshot is from one of my repos, I didn't have my laptop handy. I wasn't trying to point out the icons just illustrating the contrast in font rendering.

I've seen reports of (and encountered myself) crashes when printing any "ambiguous width" characters, but only when I've closed at least one tab. Is that the case here?

I've seen reports of (and encountered myself) crashes when printing any "ambiguous width" characters, but only when I've closed at least one tab. Is that the case here?

No it isn't. This crash happens with only creating a vertical window in tmux and maximing and minimizing back the terminal. Maybe the extra tmux window could be considered as "ambiguous width" character.

Luis: What version of tmux?

I'm using:

tmux 2.6
Microsoft Windows [Version 10.0.18362.329]

I'll try 2.6 when I get home and let you know if I can reproduce that crash. I still need to compile 3.0. I think it's challenging because it's not just the version of the terminal emulation application, it's the version of the all of the libraries tied to your linux distro, then the WSL translation, then the application. So something that could be a bug in any of those layers only comes to the surface because you have a usable terminal emulator in windows. In any case, I'll dump out everything on my setup when I get home so you can at least work in a sane environment.

I understand what you say. Could you tell me a combination which apparently doesn't give any problem?
I'm also using Ubuntu 18.04 dowloaded from the Microsoft Store

Luis:
Windows 10 Home version: 1903 OS build: 18362.295
tmux 2.1
NAME="Ubuntu"                                                                                VERSION="16.04.4 LTS (Xenial Xerus)"                                                                                ID=ubuntu                                                                                ID_LIKE=debian                                                                                PRETTY_NAME="Ubuntu 16.04.4 LTS"                                                                                VERSION_ID="16.04"                                                                                HOME_URL="http://www.ubuntu.com/"                                                                                SUPPORT_URL="http://help.ubuntu.com/"                                                                                BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"                                                                                VERSION_CODENAME=xenial                                                                                UBUNTU_CODENAME=xenial
I hope this works for you man, I tested all splits, switching layouts within splits, maximizing / minimizing the term and its not crashing on me. I spent some time navigating with multiple sessions and it's all working... just slowly.
I'll let you know if I get anything else interesting. Good luck man, let me know if I missed anything.
J

I can't reproduce this on the following:
tmux 2.8
Windows Terminal 0.4.2382.0
Ubuntu 19.04
Windows 10 1903
I get strange glyph issues described above on my work PC but not home PC and I can't work out why!

Here it is the shortcut to the Feedback Hub issue: https://aka.ms/AA60xiv

I do not experience exactly such an issue. I faced with suddenly windows terminal closing when I'm using tmux in WSL. Usually, it happens on quite long sessions - more than one day.  tmux server continues work in this case. With Command Prompt the result is the same.

This seems to have been fixed with 0.6. Let me know if not.

It seems so.

If it was gone, it is now back
$ wsl --version
WSL-version: <IP_ADDRESS>
Kerneversion: <IP_ADDRESS>-1
WSLg-version: 1.0.59
MSRDC-version: 1.2.4677
Direct3D-version: 1.611.1-81528511
DXCore-version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows-version: 10.0.19045.3930

@IUJakob This thread is more than 4 years old. If you're seeing something like this, it's surely a different root cause. You should file a new issue.


frame::Frame::set_label() doesn't clear the existing text

This code works fine, clearning the text in the statusbar frame after 2 seconds:
statusbar.set_frame(fltk::enums::FrameType::FlatBox);
fltk::app::add_timeout(2.0, {
    let mut statusbar = statusbar.clone();
    move || {
	statusbar.set_label("");
    }
});

But this code doesn't work:
statusbar.set_frame(fltk::enums::FrameType::EngravedFrame);
fltk::app::add_timeout(2.0, {
    let mut statusbar = statusbar.clone();
    move || {
	statusbar.set_label("");
	statusbar.redraw();
    }
});

with or without the redraw.
Surely this is a bug?

It's an FLTK behaviour where FrameTypes without a solid background actually would require a redraw of their parent (if the parent has a solid background) or the application.
EngravedFrame has no solid background, so you can replace statusbar.redraw() with fltk::app::redraw().

Thank you that worked great.


Banned on the discord for "Adding executables"

Sorry I dont know how else to open up an issue....
What problem did you encounter?
I got banned on the discord for "adding executables". Some dude said to remove the executables since it was against the rules so I immediately did and than went to go look through the rules and like 2 minutes later I was banned. I was trying to search the rules (as in actually search with the bar in top right not as in scouring) for the word exe but nothing was coming up. And than I decided to manually read and saw that it said at one of the last few rules (I think it was #17 No posting executables). But since I was told to remove it and I removed the executable immediately when asked, I don't understand why I was banned. It was a Multi-Instance exe i was just trying to help. And I removed it immediately w/o arguing or questioning at all. I genuinely didn't know I didn't do this maliciously or anything like that.

posting multi instances exes is not allowed

Hi, I’m the one that banned you.

 Even despite the warnings.

dont post your discord appeals here lol


chg:usr:Fixed paper1 review comments

Fixed minor review comments on paper 1

your pull request has a conflict

Discarding the old tex and rebasing to resolve the issue. I will raise a new one with fixes


java.vmoptions not retaining changes

The '/root/.biglybt/java.vmoptions' file gets overwritten with each installation. When I update the container, I need to reconfigure the RAM limit in the biglybt settings.

Thanks for the issue. Originally it was necessary to remove that file so the installer would work. I have added more conditional logic so that we don't modify the file more than once. Please test the 'donotremovejavavmoptions' branch if you can, otherwise I will merge soon after more testing.

Apologies for the late reply. I have just tested it, and it seems to be working as expected. Could you also include Asian fonts in the installer to ensure that the torrent titles are displayed correctly?
apt install -y fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core

done, thanks for the reminder, I lost track of the asian font request.


Review IAM Roles and Policies

Review and scale back IAM Roles and Policies
In most cases we used FullAccess for IAM permissions. We should coordinate with IAS to determine how to review the permissions that have actually been used by each resource and scale back the CF templates (and SAM template).

Thanks Brian - I added this to the UC3 Operations & Infrastructure Board
https://github.com/orgs/CDLUC3/projects/8/views/1

From: Brian Riley @.>
Sent: Wednesday, September 28, 2022 10:46 AM
To: CDLUC3/dmp-hub-cfn @.>
Cc: Subscribed @.***>
Subject: [CDLUC3/dmp-hub-cfn] Review IAM Roles and Policies (Issue #1)
CAUTION: EXTERNAL EMAIL
Review and scale back IAM Roles and Policies
—
Reply to this email directly, view it on GitHubhttps://github.com/CDLUC3/dmp-hub-cfn/issues/1, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAGF4L3C5FN4CHO6TUIVBYLWAR76PANCNFSM6AAAAAAQYAL5BY.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

Marisa needs to request increased permissions for visibility in AWS Console.


[ADAM-940] Fix adam2vcf -sort_on_save flag

The -sort_on_save flag allows users to sort an adam file
before saving to VCF format.
The ADAMVCFOutputFormat stores VariantContextWritable objects
which are not Serializable. If a user requests a sort, this
elicits a shuffle which, prior to this commit, would exit
with an NPE at serialization.
The fix is to only convert to VariantContextWritable
objects immediately before saving since the Hadoop output
format understands how to write Writables.

This fixed #940

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1086/Build result: FAILURE[...truncated 32 lines...]Triggering ADAM-prb ? 2.3.0,2.10,1.5.2,centosTriggering ADAM-prb ? 2.6.0,2.11,1.5.2,centosTriggering ADAM-prb ? 1.0.4,2.11,1.2.1,centosTriggering ADAM-prb ? 2.3.0,2.11,1.5.2,centosTriggering ADAM-prb ? 2.3.0,2.11,1.3.1,centosADAM-prb ? 2.3.0,2.10,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.11,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.10,1.6.0,centos completed with result SUCCESSADAM-prb ? 1.0.4,2.10,1.2.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.10,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.6.0,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.10,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.2.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.10,1.6.0,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.2.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.11,1.6.0,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.11,1.5.2,centos completed with result SUCCESSADAM-prb ? 1.0.4,2.11,1.2.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.11,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.3.1,centos completed with result SUCCESSNotifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'
Test FAILed.

retest this please

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1087/Build result: FAILURE[...truncated 32 lines...]Triggering ADAM-prb ? 2.3.0,2.10,1.5.2,centosTriggering ADAM-prb ? 2.6.0,2.11,1.5.2,centosTriggering ADAM-prb ? 1.0.4,2.11,1.2.1,centosTriggering ADAM-prb ? 2.3.0,2.11,1.5.2,centosTriggering ADAM-prb ? 2.3.0,2.11,1.3.1,centosADAM-prb ? 2.3.0,2.10,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.11,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.10,1.6.0,centos completed with result SUCCESSADAM-prb ? 1.0.4,2.10,1.2.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.10,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.6.0,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.10,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.2.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.10,1.6.0,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.2.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.11,1.6.0,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.11,1.5.2,centos completed with result SUCCESSADAM-prb ? 1.0.4,2.11,1.2.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.11,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.3.1,centos completed with result SUCCESSNotifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'
Test FAILed.

Looks like methods missing from Spark version 1.2.1
[ERROR] /home/jenkins/workspace/ADAM-prb/HADOOP_VERSION/1.0.4/SCALAVER/2.10/SPARK_VERSION/1.2.1/label/centos/adam-core/src/main/scala/org/bdgenomics/adam/rdd/variation/VariationRDDFunctions.scala:48: error: value leftOuterJoin is not a member of org.apache.spark.rdd.RDD[(org.bdgenomics.adam.rich.RichVariant, org.bdgenomics.adam.models.VariantContext)]
[ERROR] possible cause: maybe a semicolon is missing before `value leftOuterJoin'?
[ERROR]       .leftOuterJoin(ann.keyBy(_.getVariant))
[ERROR]        ^
[ERROR] /home/jenkins/workspace/ADAM-prb/HADOOP_VERSION/1.0.4/SCALAVER/2.10/SPARK_VERSION/1.2.1/label/centos/adam-core/src/main/scala/org/bdgenomics/adam/rdd/variation/VariationRDDFunctions.scala:110: error: value sortByKey is not a member of org.apache.spark.rdd.RDD[(org.bdgenomics.adam.models.ReferencePosition, org.bdgenomics.adam.models.VariantContext)]
[ERROR]       keyByPosition.sortByKey()
[ERROR]                     ^
[ERROR] /home/jenkins/workspace/ADAM-prb/HADOOP_VERSION/1.0.4/SCALAVER/2.10/SPARK_VERSION/1.2.1/label/centos/adam-core/src/main/scala/org/bdgenomics/adam/rdd/variation/VariationRDDFunctions.scala:129: error: value saveAsNewAPIHadoopFile is not a member of org.apache.spark.rdd.RDD[(org.apache.hadoop.io.LongWritable, org.seqdoop.hadoop_bam.VariantContextWritable)]
[ERROR]     writableVCs.saveAsNewAPIHadoopFile(
[ERROR]                 ^
[ERROR] /home/jenkins/workspace/ADAM-prb/HADOOP_VERSION/1.0.4/SCALAVER/2.10/SPARK_VERSION/1.2.1/label/centos/adam-core/src/main/scala/org/bdgenomics/adam/rdd/variation/VariationRDDFunctions.scala:143: error: value groupByKey is not a member of org.apache.spark.rdd.RDD[(org.bdgenomics.adam.rich.RichVariant, org.bdgenomics.formats.avro.Genotype)]
[ERROR] possible cause: maybe a semicolon is missing before `value groupByKey'?
[ERROR]       .groupByKey
[ERROR]        ^
[ERROR] four errors found

retest this please

retest this please

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1093/Build result: FAILURE[...truncated 32 lines...]Triggering ADAM-prb ? 2.3.0,2.10,1.6.0,centosTriggering ADAM-prb ? 2.3.0,2.11,1.2.1,centosTriggering ADAM-prb ? 2.6.0,2.11,1.6.0,centosTriggering ADAM-prb ? 2.6.0,2.11,1.5.2,centosTriggering ADAM-prb ? 2.3.0,2.11,1.5.2,centosADAM-prb ? 1.0.4,2.10,1.2.1,centos completed with result FAILUREADAM-prb ? 2.3.0,2.11,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.10,1.6.0,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.2.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.10,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.6.0,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.11,1.3.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.4.1,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.3.1,centos completed with result SUCCESSADAM-prb ? 1.0.4,2.11,1.2.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.10,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.10,1.6.0,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.2.1,centos completed with result FAILUREADAM-prb ? 2.6.0,2.11,1.6.0,centos completed with result SUCCESSADAM-prb ? 2.6.0,2.11,1.5.2,centos completed with result SUCCESSADAM-prb ? 2.3.0,2.11,1.5.2,centos completed with result SUCCESSNotifying endpoint 'HTTP:https://webhooks.gitter.im/e/ac8bb6e9f53357bc8aa8'
Test FAILed.

Hi @massie!
Before you commit this, there seems to be a small problem with this code. With the change, my VCFs are now being sorted but differently than the convention that GATK follows. For example, when evaluating my variants I got
##### ERROR   /home/eecs/amchen/data/working/NA12878.gmm.vcf contigs = [1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 3, 4, 5, 6, 7, 8, 9, GL000191.1, GL000192.1, GL000193.1, GL000194.1, GL000195.1, GL000196.1, GL000197.1, GL000198.1, GL000199.1, GL000200.1, GL000201.1, GL000202.1, GL000203.1, GL000204.1, GL000205.1, GL000206.1, GL000207.1, GL000208.1, GL000209.1, GL000210.1, GL000211.1, GL000212.1, GL000213.1, GL000214.1, GL000215.1, GL000216.1, GL000217.1, GL000218.1, GL000219.1, GL000220.1, GL000221.1, GL000222.1, GL000223.1, GL000224.1, GL000225.1, GL000226.1, GL000227.1, GL000228.1, GL000229.1, GL000230.1, GL000231.1, GL000232.1, GL000233.1, GL000234.1, GL000235.1, GL000236.1, GL000237.1, GL000238.1, GL000239.1, GL000240.1, GL000241.1, GL000242.1, GL000243.1, GL000244.1, GL000245.1, GL000246.1, GL000247.1, GL000248.1, GL000249.1, MT, NC_007605, X, Y, hs37d5]
##### ERROR   reference contigs = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, X, Y, MT, GL000207.1, GL000226.1, GL000229.1, GL000231.1, GL000210.1, GL000239.1, GL000235.1, GL000201.1, GL000247.1, GL000245.1, GL000197.1, GL000203.1, GL000246.1, GL000249.1, GL000196.1, GL000248.1, GL000244.1, GL000238.1, GL000202.1, GL000234.1, GL000232.1, GL000206.1, GL000240.1, GL000236.1, GL000241.1, GL000243.1, GL000242.1, GL000230.1, GL000237.1, GL000233.1, GL000204.1, GL000198.1, GL000208.1, GL000191.1, GL000227.1, GL000228.1, GL000214.1, GL000221.1, GL000209.1, GL000218.1, GL000220.1, GL000213.1, GL000211.1, GL000199.1, GL000217.1, GL000216.1, GL000215.1, GL000205.1, GL000219.1, GL000224.1, GL000223.1, GL000195.1, GL000212.1, GL000222.1, GL000200.1, GL000193.1, GL000194.1, GL000225.1, GL000192.1, NC_007605, hs37d5]

I'll try to put in a fix but the second part with the GL contigs confuses me. It seems like they are neither alphabetically nor numerically sorted..

@andrewmchen neither sort order is wrong per se, but it means that the VCF you are recalibrating and the reference are sorted differently. Which reference build are you using? HG19 or GRCh38? If GRCh38, I can send you a link to a reference build with the same sort order. If HG19, I'll be generating a properly sorted reference tomorrow.
Also, see #952 and associated issues.

Oh right, I'm using a reference file called hs37d5.fa. Not sure which one above it corresponds to. Also thanks for offering to send me the correct reference but since most of my other stuff is using this reference (I think?!) it would be safer to stick with this one. I'm currently planning to just use picard to sort my VCF.
In the meantime, I can try taking a look at issue #952 if no one else is.

hs37 is a specific build of b37 (which is approximately HG19). The problem will be your VCF header lines and associated bogus stuff.

Thanks for finding this incongruity, @andrewmchen.
As an aside, one of our general community rules is that the person submitting the PR isn't allowed to merge it. It's not until you and others feel it's ready, will it be merged by someone else on the team.
Let me know if you need any help "sorting" this out.

Jenkins, retest this please.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1096/
Test PASSed.

Thank you, @massie!  Merged manually.


Segmentation fault

For following code, instead of infinite loop, Trealla crash with segmentation fault quickly:
:- initialization(main).

main :-
        loop(_).

loop(X) :-
        write(loop), nl,
        foo(_),
        loop(X).

foo(_).

Output:
% tpl foo.pro
loop
loop
loop
Segmentation fault (core dumped)

Backtrace:
Core was generated by `tpl foo.pro'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000043a40c in unify_compound (q=0x1308ed0, term1=0x130ba70, context1=2, term2=0x130b4e0, context2=5)
    at src/jela.c:607
607                     if (is_compound(tmp1) && is_compound(tmp2))
(gdb) bt
#0  0x000000000043a40c in unify_compound (q=0x1308ed0, term1=0x130ba70, context1=2, term2=0x130b4e0, context2=5)
    at src/jela.c:607
#1  0x000000000043a518 in unify (q=0x1308ed0, term1=0x130ba20, context1=2, term2=0x130b490, context2=5) at src/jela.c:626
#2  0x000000000043a9e4 in match (q=0x1308ed0) at src/jela.c:735
#3  0x00000000004399bb in call (q=0x1308ed0) at src/jela.c:427
#4  0x0000000000439b5d in run_me (q=0x1308ed0) at src/jela.c:469
#5  0x00000000004081c4 in query_run (self=0x1308ed0) at src/trealla.c:909
#6  0x0000000000409887 in trealla_run_query (self=0x12fa010, src=0x1305460 "main.") at src/trealla.c:1392
#7  0x000000000040947b in trealla_consult_file (self=0x12fa010, filename=0x7ffd5732b818 "foo.pro") at src/trealla.c:1293
#8  0x0000000000404f5c in main (ac=2, av=0x7ffd57329a38) at tpl.c:364
(gdb)

Add a slightly different test to trealla-tests repo, which has a finite loop.

It's to do with the default -O3 level optimization
(tail-recursion-elimination). Add -O2 and it works.
On Sun, Jun 4, 2017 at 2:49 PM, Xin Wang<EMAIL_ADDRESS>wrote:

For following code, instead of infinite loop, Trealla crash with
segmentation fault quickly:
:- initialization(main).
main :-
loop(_).
loop(X) :-
write(loop), nl,
foo(_),
loop(X).
foo(_).
Output:
% tpl foo.pro
loop
loop
loop
Segmentation fault (core dumped)
Backtrace:
Core was generated by `tpl foo.pro'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000043a40c in unify_compound (q=0x1308ed0, term1=0x130ba70, context1=2, term2=0x130b4e0, context2=5)
at src/jela.c:607
607                     if (is_compound(tmp1) && is_compound(tmp2))
(gdb) bt
#0  0x000000000043a40c in unify_compound (q=0x1308ed0, term1=0x130ba70, context1=2, term2=0x130b4e0, context2=5)
at src/jela.c:607
#1  0x000000000043a518 in unify (q=0x1308ed0, term1=0x130ba20, context1=2, term2=0x130b490, context2=5) at src/jela.c:626
#2  0x000000000043a9e4 in match (q=0x1308ed0) at src/jela.c:735
#3  0x00000000004399bb in call (q=0x1308ed0) at src/jela.c:427
#4  0x0000000000439b5d in run_me (q=0x1308ed0) at src/jela.c:469
#5  0x00000000004081c4 in query_run (self=0x1308ed0) at src/trealla.c:909
#6  0x0000000000409887 in trealla_run_query (self=0x12fa010, src=0x1305460 "main.") at src/trealla.c:1392
#7  0x000000000040947b in trealla_consult_file (self=0x12fa010, filename=0x7ffd5732b818 "foo.pro") at src/trealla.c:1293
#8  0x0000000000404f5c in main (ac=2, av=0x7ffd57329a38) at tpl.c:364
(gdb)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/trealla-lang/trealla/issues/128, or mute the thread
https://github.com/notifications/unsubscribe-auth/AVqpEvQwV7qRDUHzJtKxQCLxRGckhzwGks5sAjc8gaJpZM4NvRka
.

And also the var-var binding. Works if the foo/1 call grounds.
On Sun, Jun 4, 2017 at 2:49 PM, Xin Wang<EMAIL_ADDRESS>wrote:

For following code, instead of infinite loop, Trealla crash with
segmentation fault quickly:
:- initialization(main).
main :-
loop(_).
loop(X) :-
write(loop), nl,
foo(_),
loop(X).
foo(_).
Output:
% tpl foo.pro
loop
loop
loop
Segmentation fault (core dumped)
Backtrace:
Core was generated by `tpl foo.pro'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000000000043a40c in unify_compound (q=0x1308ed0, term1=0x130ba70, context1=2, term2=0x130b4e0, context2=5)
at src/jela.c:607
607                     if (is_compound(tmp1) && is_compound(tmp2))
(gdb) bt
#0  0x000000000043a40c in unify_compound (q=0x1308ed0, term1=0x130ba70, context1=2, term2=0x130b4e0, context2=5)
at src/jela.c:607
#1  0x000000000043a518 in unify (q=0x1308ed0, term1=0x130ba20, context1=2, term2=0x130b490, context2=5) at src/jela.c:626
#2  0x000000000043a9e4 in match (q=0x1308ed0) at src/jela.c:735
#3  0x00000000004399bb in call (q=0x1308ed0) at src/jela.c:427
#4  0x0000000000439b5d in run_me (q=0x1308ed0) at src/jela.c:469
#5  0x00000000004081c4 in query_run (self=0x1308ed0) at src/trealla.c:909
#6  0x0000000000409887 in trealla_run_query (self=0x12fa010, src=0x1305460 "main.") at src/trealla.c:1392
#7  0x000000000040947b in trealla_consult_file (self=0x12fa010, filename=0x7ffd5732b818 "foo.pro") at src/trealla.c:1293
#8  0x0000000000404f5c in main (ac=2, av=0x7ffd57329a38) at tpl.c:364
(gdb)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/trealla-lang/trealla/issues/128, or mute the thread
https://github.com/notifications/unsubscribe-auth/AVqpEvQwV7qRDUHzJtKxQCLxRGckhzwGks5sAjc8gaJpZM4NvRka
.

Thanks, fix confirmed.


CF222 fresh install: cf apps returns "status code: 500, error code: 10001, message: An unknown error occurred"

Hi.
I deployed CF222 on AWS. After the deployment 'cf login' and 'cf apps' succeeded.
After some time (~2h) when I tried to list apps for my org:
ubuntu@ip-10-0-0-193:~$ cf apps
Getting apps in org seedorg / space seedspace as admin...
FAILED
Server error, status code: 500, error code: 10001, message: An unknown error occurred.`

I exported CF_TRACE=true and got:

`Getting apps in org seedorg / space seedspace as admin...

REQUEST: [2016-01-20T14:24:46Z]
GET /v2/spaces/034f5b34-ba1b-4f66-a24a-4944bf1e6aa3/summary HTTP/1.1^M
Host: api.test.domain^M
Accept: application/json^M
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json^M
User-Agent: go-cli 6.15.0+fa1bfe2 / linux^M
^M

RESPONSE: [2016-01-20T14:24:46Z]
HTTP/1.1 500 Internal Server Error^M
Content-Length: 99^M
Connection: keep-alive^M
Content-Type: application/json;charset=utf-8^M
Date: Wed, 20 Jan 2016 14:24:30 GMT^M
Server: nginx^M
X-Cf-Requestid: 08cb3e26-43c6-40cf-679b-9ff2acbe9fee^M
X-Content-Type-Options: nosniff^M
X-Vcap-Request-Id: 764ebfdb-adf5-418b-6e45-65df517065fc::10cfce42-78f0-4ff1-bc09-9460ceaf72fb^M
^M
{
  "error_code": "UnknownError",
  "description": "An unknown error occurred.",
  "code": 10001
}

FAILED
Server error, status code: 500, error code: 10001, message: An unknown error occurred.
FAILED
Server error, status code: 500, error code: 10001, message: An unknown error occurred.

I checked situation on router_z1/0, router_z2/0 machines and they only show 500 errors in /var/vcap/data/sys/log/gorouter/access.log, 'monit summary' shows that everything is ok.
I checked then the status of api_z1/0 and api_z2/0 machines and verified that 'monit summary' reports no problems but in /var/vcap/data/sys/log/cloud_controller_ng/cloud_controller_ng.log I see info provided in the attached text file. Basically:
{"timestamp":1453301514.5059805,"message":"Request failed: 500: {\"code\"=>10001, \"description\"=>\"SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed\", \"error_code\"=>\"CF-SSLError\", \"ba
cktrace\"=>...

I noticed now that also 'cf create-org' is failling now:
ubuntu@ip-10-0-0-193:~$ cf create-org test
Creating org test as admin...
OK

Assigning role OrgManager to user admin in org test ...
FAILED
Failed assigning org role to user: Server error, status code: 500, error code: 10001, message: An unknown error occurred.
ubuntu@ip-10-0-0-193:~$ cf orgs
Getting orgs as admin...

name
seedorg
test

Any clues?
api_z20.txt
BR,
Rafal.

Hi Rafal,
This appears to be related to the issue you filed via the mailing list about create-org. I'm going to close out the mailing list issue and attempt to help you here on github.
From the stack trace in the log you provided it looks like there is an SSL error between the CC and the UAA. Can you please post your manifest? It is important that we see what SSL certs are where so if you do not wish to post your manifest with un-redacted certs can you label each unique cert/keypair and redact the actual values?
Thanks,
@zaksoup
CF Release Integration

@rradecki
This issue has been open without reply now for one week, so I'm going to close it.
If you have more to add please feel free to open a new issue.
Thanks,
Rob


Allow running without bevy_render

hello
im building a 2d multiplayer game, and for example i wanted to use this plugin's event to deal damage to a target at a certain frame.
my server would run in headless, without rendering or loading any texture, and so this plugin doesn't work currently without bevy_render because the 3d systems use Res<Assets<Image>>.
a feature flag, either no_bevy_render, or a 3d enabled by default, to enable 3d sprites support.
a step further if you think it's good, would be a runtime config on the SpritesheetAnimationPlugin to enable or not the 3d sprites support. this is useful, to support on the same binary, headless and full game rendering. (server headfull, and server headless without render)
would be just a 3d: bool field, enabled by default with a Default impl on the struct.
of course, i would be happy to do the PR if you accept these features. They shouldn't change the default behavior of this crate, but only allow it to be more flexible.
thanks

That's an interesting use case, the suggested changes all sound good to me.
As you mentionned, the default configuration should enable 3D sprites so that everything work out of the box for the most common use cases.
Don't hesitate to make a PR.

ill do a pr soon !
what method do you prefer ? the feature flag or plugin option ?
the plugin option is more flexible:

this is useful, to support on the same binary headless and full game rendering

I agree that the plugin option is better, we'll just release a new major version.

hey, even while disabling all three 3d systems and the 3d cache, i can't seems to make to plugin works without the SpritePlugin. do you have a idea why ?
i have replaced the &mut TextureAtlas in the querys to a Option, so that the plugin can work without bevy render (TextureAtlas are part of bevy render i learned).
There are no errors, but the play_frame method is only called once, at initialization i think.
with some logging i found that in Animator.update the animation_instance.accumulated_time is going up really slowly, like by 1 every few seconds, instead of going the normal speed (really fast)

Mmh difficult to say what could be the cause. At first thought, your idea of replacing the TextureAtlas with an Option seems intuitive.
Have you found out why accumulated_time goes so slowly? Something wrong with Bevy's timer (shouldn't be dependent on the sprite plugin)? Or the sprite's speed factor?

I'll continue my search after work, I'll keep this thread updated !

yep its time related.
in the animator.update method, using minimalplugin the time.delta is ~190microseconds, while with defaultplugins its in the ~2.4ms.
ill try to find why

running the schedule slower fix it as expected:
            MinimalPlugins.set(ScheduleRunnerPlugin::run_loop(Duration::from_millis(
                1000 / 60,
            ))),

but i dont know why smaller values dont work, might be float imprecision ?

yep probably float imprecision or a wrong calculation :)
i have just replaced the u32 used internally by the duration type, and thanks to rust everything now works lol
lesson learned, always use the type made for it

yep probably float imprecision or a wrong calculation :)
i have just replaced the u32 used internally by the duration type, and thanks to rust everything now works lol
lesson learned, always use the type made for it

do i also replace the u32 by Duration in the
pub enum AnimationDuration {
    PerFrame([u32](https://doc.rust-lang.org/nightly/std/primitive.u32.html)),
    PerRepetition([u32](https://doc.rust-lang.org/nightly/std/primitive.u32.html)),
}
``` type ?
This would further reduce the possibility of bugs by explicitly having to set which unit is it.
if this is too much which i understand, ill just put a doc comment saying in milliseconds

it even revealed a wrong test !

Nice find!
I'd suggest not replaceing u32s in AnimationDuration with Durations.
(In an older version of the library, we used Duration but it made things more verbose without much added value since ms is a reasonnably standard unit for animations)

#22 merged


HTTP Fetch fails with "TypeError: Network request failed" => Resolved

Description
There are 83 issues opened and unanswered about network requests failing with this generic error.
The main causes of the pain are:

Not getting an answer from the team
The exception is far too generic and does not suggest the origin of the problem

Problem description
Using fetch to get/post on a HTTPS web server which is using a valid and trusted but not public CA.

Using Chrome and other apps the requests are always successful and without certificate problems

Sample code in react native:
static async Post(): Promise<string> {
    let srv = "my.domain.com";
    let port = 5101;
    let device = "abcd";
    let url = `https://${srv}:${port}/Do/Something?devicename=${device}`;

    try {
        let response = await fetch(url, {
            method: 'POST',
            headers: {
                'Accept': 'application/json',
                'Content-type':'application/json'
            },
            body: JSON.stringify({
                key: 'value',
            })
        });

        if(response.status !== 200) throw new Error(`Can't open  ${srv} for ${device} with status ${response.status}`);
        return response.json();
    }
    catch(e) {
        console.log(e);
        throw(e);
    }
}

Solution
Due to Android restrictions, a network_security_config configuration must be added to the application. It is an xml file that can be added by following these steps:

Edit the android/app/src/main/AndroidManifest.xml
Add the android:networkSecurityConfig="@xml/network_security_config" to the <application /> tag
Create the folder android/app/src/main/res/xml and inside a file called network_security_config.xml
If you don't want to install the CA in the Android certificates, add the folder android/app/src/main/res/raw

Variant 1: using the certificates added manually to Android.
In this case the CA must be visible in the User Certificates in the Android Settings. Try using them by opening a website that uses those certificates in Chrome to verify they are valid and correctly installed.
Content of the network_security_config.xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config>
        <!-- Localhost config is NEEDED from react-native for the bundling to work  -->
        <domain-config cleartextTrafficPermitted="true">
            <domain includeSubdomains="true"><IP_ADDRESS></domain>
            <domain includeSubdomains="true"><IP_ADDRESS></domain>
            <domain includeSubdomains="true">localhost</domain>
        </domain-config>

        <domain includeSubdomains="true">my.domain.com</domain>
        <trust-anchors>
            <certificates src="user"/>
            <certificates src="system"/>
        </trust-anchors>
    </domain-config>
</network-security-config>

The <certificates src="user"/> is the one giving access to the certificates installed manually.
Variant 2: using a certificate bundled with the app
You should export (using ssl) a pem certificate containing just the public key, naming it "ca" (no extension). Copy the certificate in the raw folder
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config>
        <!-- Localhost config is NEEDED from react-native for the bundling to work  -->
        <domain-config cleartextTrafficPermitted="true">
            <domain includeSubdomains="true"><IP_ADDRESS></domain>
            <domain includeSubdomains="true"><IP_ADDRESS></domain>
            <domain includeSubdomains="true">localhost</domain>
        </domain-config>

        <domain includeSubdomains="true">my.domain.com</domain>
        <trust-anchors>
            <certificates src="@raw/ca"/>
            <certificates src="system"/>
        </trust-anchors>
    </domain-config>
</network-security-config>

Important note (added on June 22, 2022)
The local traffic (with the packager) must be unencrypted.  For this reason the <domain-config /> must contain the clearTrafficPermitted=true.
It is also important adding the ip addresses used from react-native when debugging otherwise the application will crash because of the android:networkSecurityConfig="@xml/network_security_config" attribute. If you see the app crashing, take not of the ip used internally from react native and add it/them to this list. For example:
<domain-config cleartextTrafficPermitted="true">
            <domain includeSubdomains="true"><IP_ADDRESS></domain>
            <domain includeSubdomains="true"><IP_ADDRESS></domain>
            <domain includeSubdomains="true"><IP_ADDRESS></domain>
            <domain includeSubdomains="true"><IP_ADDRESS></domain>
            <domain includeSubdomains="true">localhost</domain>
        </domain-config>

Requested fix: please never throw exceptions with a generic message, they are only a huge pain.
Version
0.67.0
Output of npx react-native info
info Fetching system and libraries information...
System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
Memory: 8.20 GB / 31.93 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.1.3 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 19, 23, 25, 26, 27, 28, 29, 30
Build Tools: 19.1.0, 21.1.2, 22.0.1, 23.0.1, 23.0.3, 26.0.2, 27.0.0, 28.0.0, 28.0.3, 29.0.2, 30.0.2
System Images: android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom
Android NDK: 22.1.7171670
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
AllowAllTrustedApps: Enabled
Versions: 10.0.10586.0, 10.0.14393.0, 10.0.15063.0, 10.0.16299.0, 10.0.17134.0, 10.0.17763.0, 10.0.18362.0, 10.0.19041.0
IDEs:
Android Studio: Version     2<IP_ADDRESS> AI-203.7717.56.2031.7935034
Visual Studio: 17.1.32104.313 (Visual Studio Enterprise 2022), 16.11.32002.261 (Visual Studio Enterprise 2019)
Languages:
Java: 1.8.0_302
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.66.4 => 0.66.4
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Use the above code to make an HTTPS request to a website protected with certificates that are not public.
They will not succeed with a generic exception (as for the issue title)
Repeat the request to a public website and it will succeed.
The issue is the exception being too generic.
Snack, code example, screenshot, or link to a repository
No response

It looks like the underlying okhttp library has quite good error detection and reporting. Somehow though, either the react-native networking layer, or the whatwg-fetch doesn't capture that!

It is an habit in this repo to ignore important issues (not only this one) for a very long time.
I start believing RN is not that worthy to invest in.

I have same issue and solve by doing this, you can try
https://github.com/facebook/react-native/issues/24627#issuecomment-1049496059

Thank you @hoaxvo16 but I already posted the solution in this thread.
My request is react-native providing a decent error so that nobody else has to spend hours in trying to resolve it.
Also, since this an OSS project, it would be nice for some of the owner to "say something" instead of infinite silence.

@raffaeler yeah i know, took me over 3 hours to solve this, good thing is you learned something new :D

I am still having the same issue! im trying to connect my react native app to django. i am using JWT. im trying to send a post method to my api but I get "TypeError: Network request failed" => Resolved every time i press the sign in button. i am using a real android device. im new to react so it is been very hard to solve this problem! can anybody help me pls? i already try all methods above but  none seem to work

fixed TypeError: Network request failed when upload file to http not https with Android debug builds

I have this problem connecting with my hosted API (with a valid SSL certificate from Let's Encrypt) on Android Level 21 (Android 5), 22 (Android 5.1), 23 (Android 6) and 24 (Android 7).
After trying both variant 1 and 2 without success, I gave up and removed support for these Android versions (represent like 5% of market share to this day).
No idea what's happening, the error doesn't help 😞

@nelsonprsousa if the certificate on the API side is publicly verifiable, you should not have this issue at all.
My issue was about telling Android+React Native how to trust a private CA.

double check that your cerificate is correctly deployed by browsing the API from a browser (I assume it is)
verify the internal android error using adb logcat

@nelsonprsousa if the certificate on the API side is publicly verifiable, you should not have this issue at all. My issue was about telling Android+React Native how to trust a private CA.

double check that your cerificate is correctly deployed by browsing the API from a browser (I assume it is)
verify the internal android error using adb logcat

Here's my API:

I am assuming it is publicly verifiable.
However, on those Android versions (not sure if until API 24 or 25), I have the "Network request failed".
I noticed that trying to directly open the website on Chrome brings an "untrusted" site or something and ask me if I want to proceed by my own. So yeah, something weird on old Android version validating certificates?!

@nelsonprsousa if this behavior happens only on older Android version, it is possible that the CA used by letsencrypt was not already available on those versions.
If you scroll in the mobile Chrome app, you should see some hint about the CA not being trusted or another error like that

@nelsonprsousa if this behavior happens only on older Android version, it is possible that the CA used by letsencrypt was not already available on those versions. If you scroll in the mobile Chrome app, you should see some hint about the CA not being trusted or another error like that

yeap..  I was reading on Google and there are some problems with letsencrypt that I don't fully understood.
Do you think that the solution you gave of bundling the certificate will solve this problem (already tried without success), or it is something else and I just hijacked this discussion? 😅

yeap.. I was reading on Google and there are some problems with letsencrypt and old Android versions that I don't fully understood.

Android ships a number of CAs that can only be updated with official security patches. If your CA was not shipped or updated at that time, of course it can't work.

Do you think that the solution you gave of bundling the certificate will solve this problem (already tried without success), or it is something else and I just hijacked this discussion? 😅

Bundling the certificate is a good solution whenever you need to use Android in an enterprise environment that works with a private CA. In your case, you could try embedding the server certificate: exporting the CA (the one used by your letsencrypt certificate) from Windows in, converting with openssl, etc.. Not sure if it can work, it's not the scenario I described ad the beginning (and yes, you hijacked the thread 😅)

I'll try to find a solution for this specific problem elsewhere. Thank you for your support 🙏

this work for me

I am also facing same issue. my endpoint is https and not http. My other internet requests are working like those with Amplify

@MuhammadAbdullah54321 this issue is strictly related to fetching with HTTPS where the server is using a private or self-signed certificate.
In this case, if you carefully follow my points you should resolve the issue.
It is very bad that meta is not even answering or even checking the issues. This should be clarified and be part of the official documentation.

Check if your SSL is properly configured here.

Check if your SSL is properly configured here.

This does not make any sense. The point of this entire thread is to use a non public CA as stated in the initial post, which is extremly common in any enterprise scenario.
The link you posted is a service that can only verify public websites. Also, I strongly reccomend to verify TLS (SSL does not exist anymore) using openssl utilities which are the most updated.

@raffaeler
out of curiosity? What does your API uses?

The backend is ASP.NET Core but this doesn't make any difference. Any fetch on HTTPS involving a private CA would trigger the same issue.

I realized I was using the http version of the endpoint so then I switched it to https and it worked.

The backend is ASP.NET Core but this doesn't make any difference. Any fetc

I'm too using .net core facing the same issue, did you find any solution for it ?

I'm too using .net core facing the same issue, did you find any solution for it ?

Yes, I wrote "Resolved" in the title for a reason :-)
In the very first post I wrote the step-by-step to resolve this.
Anyway I am totally scared of Meta not taking in account the community about this. It's a real shame.

Lemme just jump in that I'm always an advocate for bubbling as much error info up the stack as possible. There are those of us who go to great lengths, perhaps even cursed lengths, to make use of the info that is available from web fetch. It does actually make a big difference in debugging for those of us who go to these lengths, it's saved me untold hours of debugging, and its vastly more useful than the standard "failed to fetch" network error. If I had the time, and lacked the extreme disdain for Java, I'd write the patch myself!

Lemme just jump in that I'm always an advocate for bubbling as much error info up the stack as possible. There are those of us who go to great lengths, perhaps even cursed lengths, to make use of the info that is available from web fetch. It does actually make a big difference in debugging for those of us who go to these lengths, it's saved me untold hours of debugging, and its vastly more useful than the standard "failed to fetch" network error. If I had the time, and lacked the extreme disdain for Java, I'd write the patch myself!

Exactly! And let me say that there is a huge difference between creating a library for internal or public use.
It looks like that some Meta developers are bullying the devs outside their company by not propagating the error as it should be in any good framework.
BTW this happens too often in many frameworks when you get errors like "file not found" without the name, etc. etc.

Yup, preaching to the choir here! I go to like a million times more effort than any other developer I know to (a) check for error codes (usually just bubbling to the UI for webapps) and (b) get the most specific error information possible to show the user. It's 10x more effort, but it's way less confusion and effort to debug basically every kind of bug I ever see.

For the entertainment of other readers, here's two issues I've opened about goofy issues I encounter when errors are not super well reported (or reportable)
https://github.com/puma/puma/issues/2894
https://github.com/nodejs/node/issues/43439

@ariccio BTW with nodejs C++ addons I lost any hope. Sometimes ago I created a generic in-process interop layer to execute any C# code from nodejs (hosting the CLR) and it was like opening the Pandora's Box.

We were also facing similar issue in Production and multiple customers complained about the problem of not able to access our App due to this error. Upon extensive debugging, we found that our cloud infra only accepted requests which had IPv4 addresses. If any device network wasn't able to allocate an IPv4 address then all such requests were getting dropped with the App receiving the "Network Request Failed" error.
Hope this helps!

2023 and they haven't addressed this generic exception issue. I've been stuck on this for days, trying every solution and nothing works. I just wanted to know what the actual error is instead of shooting on the dark.

In case anyone interested, I've had the same issue, and the source was very interesting.
We've added Certificate pinning to our app to make sure attackers can't spy the traffic, and hardcoded the public keys for the certificate. The certificate was recreated, but we didn't update these public keys.
Not the case which would happen for a lot of users tbh

It might be worth noting that I saw this error when I attempted to send a JSON.stringify'd body, without the 'Content-type':'application/json' header.

I have face the same issue when I am testing app on emulator and physical device, but the solution above do not work for me. Here is my react-native project info:
System:
    OS: macOS 13.4
    CPU: (8) arm64 Apple M1
    Memory: 90.45 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
    Yarn: Not Found
    npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm
    Watchman: 2<IP_ADDRESS> - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.12.1 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
    Android SDK:
      API Levels: 32, 33
      Build Tools: 30.0.3, 33.0.0, 34.0.0
      System Images: android-33 | Google APIs ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2022.2 AI-222.4459.24.2221.9971841
    Xcode: 14.1/14B47b - /usr/bin/xcodebuild
  Languages:
    Java: <IP_ADDRESS> - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.10 => 0.71.10
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

I have add android:networkSecurityConfig="@xml/react_native_config" to AndroidManifest.xml, but my react-native project does not have xml dictionary in android/app/src/main, although I tried to create and add xml/react_native_config in android/app/src/main. However it shows following error:
FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : Attribute application@networkSecurityConfig value=(@xml/react_native_config) from
AndroidManifest.xml:17:7-67 is also present at AndroidManifest.xml:17:7-67 value=(@xml/network_security_config).
Suggestion: add 'tools:replace="android:networkSecurityConfig"' to <application> element at AndroidManifest.xml:7:5-13:19 to override.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

Am I miss something to fix?

I have face the same issue when I am testing app on emulator and physical device, but the solution above do not work for me.

The changes I wrote are well-documented in the Android docs. If you have errors, there is certainly something wrong with your project. You should first carefully fix them first.

I have face the same issue when I am testing app on emulator and physical device, but the solution above do not work for me.

The changes I wrote are well-documented in the Android docs. If you have errors, there is certainly something wrong with your project. You should first carefully fix them first.

Thank you for the reply. I have found the reason of that is because the manifest merger failed to merge debug/AndroidManifest.xml and main/AndroidManifest.xml, I makes two AndroidManifest.xml have same user-permission configuration and it's work right now.
<!-- Two AndroidManifest.xml have same user-permission configure -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.INTERNET" />
    ...
</manifest>

and it's work right now.

This makes sense, thanks for the feedback.

I face a similar problem last week, this time it raise the TypeError: Network Request Failed when I upload a blob with formData, I have tried to append string into formData and work just fine, but not Blob. Here is my code:
const formData = new FormData();
formData.append('image', Blob, 'test.jpg)
fetch('http://api_end_point', {
    method: 'POST',
    header: { 'Content-Type': 'multipart/form-data' },
    boby: formData,
  }
).then(...).catch(...);
// Then raise TypeError: Network Request Failed

I have found some solutions: https://github.com/facebook/react-native/issues/28551#issuecomment-610652110,
but still not able to fix my problem.
My React Native project info:
System:
    OS: macOS 13.4
    CPU: (8) arm64 Apple M1
    Memory: 90.45 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node
    Yarn: Not Found
    npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm
    Watchman: 2<IP_ADDRESS> - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.12.1 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
    Android SDK:
      API Levels: 32, 33
      Build Tools: 30.0.3, 33.0.0, 34.0.0
      System Images: android-33 | Google APIs ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2022.2 AI-222.4459.24.2221.9971841
    Xcode: 14.1/14B47b - /usr/bin/xcodebuild
  Languages:
    Java: <IP_ADDRESS> - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.10 => 0.71.10
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Still to this day, the error messages for fetch network errors are super super vague. Is this going to get fixed?

@GNUGradyn You can use rn-fetch-blob fetch method instead of normal fetch

POSIBLE SOLUTION
I faced the same problem (iOS working & Android failure) and in the end it turned out to be a problem because the domain to which the request was made contained an underscore (_) character. Removing the underscore by a dash solved the problem.
Previos domain
https://my_domain.com
Working domain
https://my-domain.com/
If you are using a domain other than localhost and use special characters it is possible that it may fail because of this. I will update my comment if I find any additional information.
I hope it helps 🙏🏻

what do yo suggest for people using Expo, as there is no direct android folder of manifest file.

@GreatGodson I'm not very familiar with Expo.
In my opinion it's better to avoid it because:

it does not provide full control over the framework and devices
when you need to move from Expo to the standard sdk, the migration requires too much effort.
I understand that is attractive for the initial simplicity, but I don´t think that you can solve with Expo, out of avoiding custom certificates.

Does your server contains full cert chain rather than only single certification?
This was a problem in my case.

Does your server contains full cert chain rather than only single certification? This was a problem in my case.

@dev-jwel
Technically a server does not contain a chain. The just server uses a certificate emitted by either a CA or a SubCA.
In my case the server certificate was emitted by a SubCA, therefore I had to add the whole chain (CA+Sub) to the app. This is mandatory, otherwise the SubCA would not be trusted and the communication will fail anyway.

It blows my mind that even though this catastrophic DX failure in RN has been around pretty much since the beginning, there still is no clear roadmap for fixing it (or, at the very least, propagate underlying errors to actually make it debuggable).
I can say without reservation that the biggest problems I have ever faced in RN development are all shitty, cryptic network errors. The hours of hell I have to through to get the Android emulator networking usable in anything but a completely vanilla, public environment is not enough. I then have to immediately waste my time trying to figure out why completely valid network requests are suddenly failing in my app, but not on the device itself.
Thanks a ton @raffaeler for doing God's work documenting issues like this, RN would more or less be dead without community members like you.

is there an alternative library we can use in place of fetch? Ie axios or just the plain xhr? Something that sidesteps this whole issue entirely?

I also have same problem any can help me please,
I want to connect appropriate api to my Android/iOS app.

@thecodemonster1 try using the native logger (e.g. Logcat for Android) to capture more detailed information about why the call fails. The Metro console will not show you this.

for me, replacing localhost or my local ip with <IP_ADDRESS> worked

@NicolasD27 do you realize that nobody can have any clue of what <IP_ADDRESS> represents in your network and that this issue should work regardless the IP assigned by the DHCP?

Has anyone tried using XMLHttpRequest.setInterceptor or RCTNetworking.addListener('didCompleteNetworkResponse' to get access to the original error data? Obv not super ideal, but should work I think?

Two patches can also be applied - this will add a detail field to the errors. It doesn't change the error type or message, but the field should be visible to tools like Sentry, and will appear when serialized.
react-native+0.74.3.patch
whatwg-fetch+3.6.20.patch
We use patch-package to apply these

Here is another solution.
adb reverse tcp:<your-server-port>tcp:<your-server-port>
It worked for me.

same issue here , when I replace ip address instead of the localhost, it works  only for emulator. With the expo go , its not working.

Still not working as of  2024-10-16
Even if trying to fetch from its own website.
const getMovies = () => {
  return fetch('https://reactnative.dev/movies.json')
    .then(response => response.json())
    .then(json => {
      Alert.alert(JSON.stringify(json));
      return json.movies;
    }).catch(error => {
      console.log(error);
      console.error(error);
    });
};
var mmm = getMovies();

@raffaeler I am having this issue right now on Expo tho, is there a solution for the manages workflow?
it seems to happen only on apis that upload files.

I faced this error due to the backend being http/1.1.
After the backend updated to http/2.x, the error was resolved.

@raffaeler I am having this issue right now on Expo tho, is there a solution for the manages workflow? it seems to happen only on apis that upload files.

I figured out my own issue, i had to manually set the type: asset.mimeType because by default it was being mapped to asset.type, which was wrong.
        const formData = new FormData();
        formData.append("file", {
          type: asset.mimeType,
          uri: asset.uri,
          name: asset.fileName,
        } as any);

It has been 2 years, and this issue is still not resolved or explained. How crazy is that ?

We ended up simplifying a bit by just patching react-native & whatwg-fetch to add a detail field to the errors. It doesn't change the error type or message, but the field should be visible to tools like Sentry, and will appear when serialized.
These are the patch files:
react-native+0.74.3.patch whatwg-fetch+3.6.20.patch
We use patch-package to apply them

Same problem here just the error no more details...
Thanks to this I was able to debug the problem

Try adding to your fetch header: "Accept-Encoding: "identity"

Try adding to your fetch header: "Accept-Encoding": "identity"

Could you please elaborate how this could help?

I guess its anecdotal to the specific error. Ive removed that part from my answer. However, I did find the solution by debugging through Android Studio, which provides an actual JVM exception. I googled my exception and found the solution, which was the encoding header.


Icon missplaced and suggestions

Required information
In order to help us sort your issue, we ask that you provide the following information:

[ ] Mac model: Late 2013 iMac 21.5"
[ ] macOS version: 10.15.5 (19F101)
[ ] Monitor setup: Default Display

Description of issue / Feature request

The icon is not in the correct position

I don not think that it looks good having the menu so far off to the side, it was better at the top.

AerialLog.txt
Here is the log if you need it.

The icon is not in the correct position

Ha, forgot that one. Will fix for next build, that's part of the icons being handled differently on Big Sur than on other systems.

I don not think that it looks good having the menu so far off to the side, it was better at the top.

Noted, but I needed the sidebar for the videos so the tabs no longer made sense. It looks better/is more in its place in Big Sur with large controls :

I think what is making it look bad is that on older versions of MacOS the part that goes out of the settings pane does not have the rounded bar at the top.

So the corners are rounded in Big Sur, I'm not 100% sure why they aren't on older OSes. I'll have to check, I think this may be because I made the window resizable, I'll see if it's fixable.

Icon is fixed. As for corners, that's sadly how they look on modal sheets pre big sur, so nothing I can do here: https://github.com/JohnCoates/Aerial/releases/tag/v2.0.0beta2


Close tab does not work

Testing #172052

@bpasero I assume this is coming from you?
https://github.com/microsoft/vscode/blob/c35bf3b3401cef46d2c4dee464adb52c97b81228/src/vs/workbench/browser/window.ts#L217

Looks like this is from @joyceerhl
https://github.com/microsoft/vscode/commit/42aa9d3e999c2a205774a173b98ad4623a53f720

I am unable to reproduce this, Close Tab works as expected for me (I'm in Edge). Which browser do you use?

I used chrome.

I was able to repro on Chrome as well, but I can't see why this would work in Edge and fail in Chrome. The warning that gets printed to the browser console when this happens is:
Scripts may close only the windows that were opened by them.

Why would we ask to close the VS Code web instance actually? I think when this flow happens it is typically a popup that opens which then triggers the protocol link and then it makes sense to close that. But for VS Code I would not expect to close the tab.

I added the Close Tab button because by opening a protocol link from web you are launching the desktop VS Code instance, so the assumption is you don't want to keep VS Code for the Web open also.

I do not think its possible to close a tab unless you opened it via JavaScript.

This works in Edge though (which is why I didn't see an issue when first implementing it).
In any case it seems like we can't support it consistently, so I think we should just take this option out.

I will do this as part of https://github.com/microsoft/vscode/issues/170492

Thank you @bpasero!


Update howto-mfa-nps-extension.md

Why is port 80 required to connect to the https endpoints?  Also mention that 443 is tcp.

Learn Build status updates of commit 4913bb9:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/active-directory/authentication/howto-mfa-nps-extension.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

Learn Build status updates of commit f0369d6:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/active-directory/authentication/howto-mfa-nps-extension.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

@justinha
Can you review the proposed changes? IMPORTANT: When the changes are ready for publication, add a #sign-off comment to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off


small fixes

clarify TensorProductOperator constructor.
fixed overloads now,  kron(...) isa AbstractMatrix, \otimes(...) isa TensorProductOperator
remove redundant +,-,*(SciMLOperator, UniformScaling) methods
~exporting \otimes as it does not conflict with anything in Base or LinearAlgebra~

good to go

@ChrisRackauckas good to go


Allow delayed defaults in Args

I have a draft PR to address this, but I feel like I probably did it wrong. What I'd like is to be able to assign a default value to a pref in such a way that it's not actually evaluated until Args.fill is called--the main use case is to prevent mallsearches in garbo before we do our big mallPrices("allitems") but I'm sure there are other use cases

Hmm, interesting idea. Some things I'll have to think about:
Typing
Right now the presence of default changes the type of the generated argument:

a: Args.number({}) generates a field args.a: number | undefined, which is undefined before args are parsed or if a is not provided.
a: Args.number({default: 2}) generates a field args.a: number, which is 2 before args are parsed or if a is not provided in the command.

Probably an argument with a delayed default would have to allow undefined, and be initialized to undefined before the args are filled.
Help
The help text currently displays the default value if given. I guess delayed defaults should show nothing in the help? Or maybe it is better to compute it and show the computed value.
--
As a workaround, I will also note that the args object is an entirely normal and mutable object (just with some hidden fields). So it should work fine to do something like:
Args.fill(args, command);
if (!args.target) args.target = defaultTarget();

I suppose this is modifying a global, and defined further away from the other arg definitions, so not ideal.