Updating book theme

This updates the theme so that we use sphinx-book-theme

@rossbar pinging you since you just tried out the CLI. This PR makes the theme a more "book-like" theme (also, a separate repository now). There are still several bugs in the theme structure, but would love to know what you think about it!

Thanks for the ping - just had a chance to look at it. The obvious downside is the page header clobbering the top of the content page, but as you said it's a WIP :). Generally I like the look, I think the content is more "front-and-center", which is important for a book theme.

@rossbar hmm, I'm not sure what you mean about the page header. Can you look at beta.jupyterbook.org for the latest?

False alarm - the problem was I had installed a cached version in my virtualenv - I see the same output as <beta.jupyterbook.org> now when I make sure everything is upgraded appropriately.


RuntimeError: CUDA out of memory

Traceback (most recent call last):
  File "train.py", line 314, in <module>
    main(arguments)
  File "train.py", line 166, in main
    segs_S1 = model_1(inputs_S1)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vision_transformer.py", line 49, in forward
    return self.swin_unet(x)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 1118, in forward
    x, x_downsample, v_values_1, k_values_1, q_values_1, v_values_2, k_values_2, q_values_2 = self.forward_features(
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 960, in forward_features
    x, v1, k1, q1, v2, k2, q2 = layer(x, i)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 726, in forward
    x, v1, k1, q1 = blk(x, attn_mask, None, None, None)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 392, in forward
    x, x2, v, k, q = self.forward_part1(x, mask_matrix, prev_v, prev_k, prev_q, is_decoder)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 340, in forward_part1
    attn_windows, cross_attn_windows, v, k, q = self.attn(x_windows, mask=attn_mask, prev_v=prev_v, prev_k=prev_k,
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 191, in forward
    attn = q @ k.transpose(-2, -1)
RuntimeError: CUDA out of memory. Tried to allocate 9.02 GiB (GPU 0; 23.70 GiB total capacity; 11.37 GiB already allocated; 8.42 GiB free; 13.10 GiB reserved in total by PyTorch) If reserved memor
y is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

Notice: I modified the dataloader to fit my own dataset. I've serched lots of solution but failed to solve this. Very sad :-(
Could you please help me? Maybe the model is too large to train? I don't know. Thanks!

Hello,
which variant are you training here? Is it tiny version with 48 embed dims?

I was training with the base.yaml. However when I turn to tiny.yaml, the bug still occured but in different line:
Traceback (most recent call last):
  File "train.py", line 306, in <module>
    main(arguments)
  File "train.py", line 166, in main
    segs_S1 = model_1(inputs_S1)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vision_transformer.py", line 49, in forward
    return self.swin_unet(x)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 1116, in forward
    x, x_downsample, v_values_1, k_values_1, q_values_1, v_values_2, k_values_2, q_values_2 = self.forward_features(
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 957, in forward_features
    x, v1, k1, q1, v2, k2, q2 = layer(x, i)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 723, in forward
    x, v1, k1, q1 = blk(x, attn_mask, None, None, None)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 389, in forward
    x, x2, v, k, q = self.forward_part1(x, mask_matrix, prev_v, prev_k, prev_q, is_decoder)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 337, in forward_part1
    attn_windows, cross_attn_windows, v, k, q = self.attn(x_windows, mask=attn_mask, prev_v=prev_v, prev_k=prev_k,
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 195, in forward
    attn = attn + relative_position_bias.unsqueeze(0)  # B_, nH, N, N
RuntimeError: CUDA out of memory. Tried to allocate 9.02 GiB (GPU 0; 23.69 GiB total capacity; 16.22 GiB already allocated; 4.95 GiB free; 16.62 Gi
B reserved in total by PyTorch)

To train tiny version you will need at least 12 GB GPU memory. From the stacktrace I can see you are using 24GB GPU and it is enough to train base version. What is the batch size in this case? Normally I use batch size of 1, if I exceed that I get the same OOM error.

Working with 1 GPUs
=> merge config from configs/vt_unet_tiny.yaml
SwinTransformerSys3D expand initial----depths:[2, 2, 2, 1];depths_decoder:[1, 2, 2, 2];drop_path_rate:0.1;num_classes:2;embed_dims:48;window:(7, 7,
 7)
---final upsample expand_first---
pretrained_path:./pretrained_ckpt/swin_tiny_patch4_window7_224.pth
---start load pretrained modle by splitting---
total number of trainable parameters 5374620
<bound method EDiceLoss_Val.metric of EDiceLoss_Val()>
Train dataset number of batch: 1332
Val dataset number of batch: 332
Bench Test dataset number of batch: 264
start training now!
Traceback (most recent call last):
  File "train.py", line 307, in <module>
    main(arguments)
  File "train.py", line 167, in main
    segs_S1 = model_1(inputs_S1)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vision_transformer.py", line 49, in forward
    return self.swin_unet(x)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 1116, in forward
    x, x_downsample, v_values_1, k_values_1, q_values_1, v_values_2, k_values_2, q_values_2 = self.forward_features(
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 957, in forward_features
    x, v1, k1, q1, v2, k2, q2 = layer(x, i)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 723, in forward
    x, v1, k1, q1 = blk(x, attn_mask, None, None, None)
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 389, in forward
    x, x2, v, k, q = self.forward_part1(x, mask_matrix, prev_v, prev_k, prev_q, is_decoder)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 337, in forward_part1
    attn_windows, cross_attn_windows, v, k, q = self.attn(x_windows, mask=attn_mask, prev_v=prev_v, prev_k=prev_k,
  File "/home/yusongli/.bin/anaconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/yusongli/_project/shidaoai/task/01_seg/VT-Unet/vtunet/vt_unet.py", line 195, in forward
    attn = attn + relative_position_bias.unsqueeze(0)  # B_, nH, N, N
RuntimeError: CUDA out of memory. Tried to allocate 9.02 GiB (GPU 0; 23.69 GiB total capacity; 16.22 GiB already allocated; 4.95 GiB free; 16.62 Gi
B reserved in total by PyTorch)

This is the entire console output. My batch_size is 1. The default batch_size is 1 and I did't modify this parameter.

Seems this is an issue with Pytorch. Did you able to solve this issue?


Will it support the creating dateframe from existing RDDs?

For example. if I have one existing rdd,
val lines = sc.textFile("/home/spark/new.xml")
how can I create the dataframe based on this rdd?

Yes it does. It has the API (although this should be deprecated)
For example, this will work:
new XmlReader()
      .withRowTag("book")
      .xmlRdd(sqlContext, rdd)

But I recently noticed there is a problem, that is, the RDD as an argument should contain each XML document for each record, meaning sc.textFile(...) with well-formed xml documents would not work. The RDD might have to be created as below:
val location = "path-to-file"
sc.newAPIHadoopFile(location,
        classOf[XmlInputFormat],
        classOf[LongWritable],
        classOf[Text]).map(pair => new String(pair._2.getBytes, 0, pair._2.getLength))

I am going to close this. Please feel free to reopen if you think it is not solved.

Sorry for the late reply. Sure, thanks!
On Mon, Sep 5, 2016 at 7:18 PM, Hyukjin Kwon<EMAIL_ADDRESS>wrote:

I am going to close this. Please feel free to reopen if you think it is
not solved.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/databricks/spark-xml/issues/114#issuecomment-244712462,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALhY0TnUnMGPolJEt0qQh9kKvkvh4X96ks5qm-yDgaJpZM4IRjBS
.

Hi ,
I'm using python 3.5.2 and spark 1.6.2 and getting
AttributeError: 'SQLContext' object has no attribute '_get_object_id'
when trying to call
XmlReader().withRowTag("CstmrCdtTrfInitn").xmlRdd(context, rdd) function.
Is it the too old version of spark issue. Appreciate your help
Thanks
Maciej


Make Leaflet.FileLayer directly compatible with Leaflet.Draw and provide simple example.

Thanks for this amazing component, its fast and I love it, however I have spent many hours trying to get draw to edit my GPX uploads with no success yet. Close but no success. My use case is that my field techs are uploading a GPS track (GPX LineString) which is actually a wildfire boundary so it needs to be edited and closed into a polygon in the mapplication. I have tried a multitude of approaches including loading in turfJS and using custom Turf Script to convert the GeoJson LineString to a bonifide Polygon, but then I am unable to load the result into draw for editing. Would be so sweet to just have these two awesome components work together out of the box somehow.

I now have this working but it involved converting the geojson from the GPX using turf and then feeding it back to the draw module.  Not sure there is anything for you to do.

It would be awesome if you could contribute a small demo of what you've done! (in an examples/ folder here for example)

In theory a great idea, in practice however, a lot of work to extract the realavant code from my gong-show, but I will put it on my todo list ;-)

Oh I would LOVE to see how to edit the points and tracks (uploaded with FileLayer) in Leaflet.Draw.
I too tried to import so that the elements can be edited but I gave up :-( So I would love to see how it works.
My assumption is/was that FileLayer just need to draw the elements to the Leaflet.Draw FeatureGroup
var drawnItems = L.featureGroup().addTo(map);
I guess they can then be edited if the elements are in that FeatureGroup. But how to get them into it? I have no idea :-(
btw: Great Plugin! Thank you!


Dev. mode no cursor

Firstly. Thank you for amazing work!
My issue: While in developer mode - alt + X, mouse dont appear. alt + Del doesent help. So cant adjust DLSS quality.

How to unlock mouse in dev mode?
Also asking for Remix support for Deus Ex: Revision. (black screen with sky now).

Hi @VladCorvi,
If you're using Deus Exe, it by default hijacks your cursor. You can turn this behavior off in its settings:

Could you let me know if that fixes it?
As for Deus Ex Revision, you'll have to ask their mod team, support is beyond the scope of this project, but, if they have any fixes I'll be happy to merge them in.

Issue solved by disabling 'Raw Input'


Fix ESP32 WiFi Deletion test

Revert "Fix WiFi network deletion for ESP32 (#2909)"
Fix WiFi Network Deletion

Description

#2909 attempted to fix a potential overflow issue in iot_ble_wifi_provisioning.c's _popNetwork, where calling delete on a non-existent network would decrement the number of networks to UINT_MAX. That commit fixed the issue by changing the return value of WiFi_NetworkDelete for ESP32 for the non-existent case, but it caused a test to fail. This PR reverts that commit and instead alters the checks of iot_ble_wifi_provisioning.c.
Checklist:

[ ] I have tested my changes. No regression in existing tests.
[ ] My code is Linted.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/bot run checks

/bot run checks

/bot run checks

/bot run checks


[3.0] Always wait for haproxy to be serving requests before continuing

We could do the wait on the different places to avoid a generic piece
like haproxy having to wait for a specific component like the apiserver,
but we are already writing specific components in its configuration, and
a future reordering of states could trigger this error again.
So, when we kill haproxy, wait for it to be serving requests again before
continuing with the next state.
On the 2 to 3 upgrade this was causing a failure because right after
restarting haproxy we were trying to drain the node. Since we run this
operation on the very same machine that is being targeted, this kubectl
command cannot reach the apiserver (because haproxy is still initializing),
causing the whole update orchestration to fail.
Fixes: bsc#1109661
(cherry picked from commit 95c1980e99e0e2a9787caab02b86056db8e199c0)
Backport of https://github.com/kubic-project/salt/pull/664

@inercia : Is this still on hold?

@inercia : Is this still on hold?

@jordimassaguerpla no :-)


Prometheus integration

Description
We start having some performance issues with metrics rendering but more important with making analysis on top of already available metrics.
Solution
To make the performance better for real-time metrics we have to think about time-series databases. Having  Prometheus as the main data source for metrics can be useful as we make integration with Grafana available by default.
Proof of concept

[ ] Use push method to add data to the Prometheus
[ ] Integration with  Prometheus API to make queries

@Farfetch/team-maestro
Since we have a lot of dynamic agents that can be provisioned for Maestro it makes sense to allow them automatically push data to Prometheus instead of scrapping metrics by Prometheus.
Another thing it's security. Agents by default don't expose any port outside. They work just on Pull basics and get regularly updated by making requests to API.
Saying that I think the best way of using Prometheus as a time-serious database we need to use Prometheus pushgateway to allow Maestro agents to send metrics directly there. This is a good way to keep metrics aggregation and sending as agent responsibility based on runner type.
The main downside is Prometheus pushgateway is going to be a single point of failure and the main performance bottleneck. In the future, we probably can have a way to use more than one gateway to scale things up but I don't see this is as a problem for the first versions.
Here is also a quick diagram of how the things will look like:
  graph TB;
     M[Maestro API] -->| GET | P[Prometheus];
     G[Grafana] --> | GET | P;
      P --> | GET | PG[Prometheus PushGateway];

      MA1[Maestro Agent]  --> | PUSH | PG
      MA2[Maestro Agent] --> | PUSH | PG;
      MA3[Maestro Agent] --> | PUSH | PG;


 This is a Linuxism.

It was fixed in 2019 with e6ff853.


Assignable Scopes

Are there any plans to allow management groups to be used as the scope for a custom role?  Would be nice to be able to do this above the subscription level.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: eac44e5e-65e1-d989-4afe-0463e8ff51d0
Version Independent ID: 5665dd03-d06e-ca29-668f-7cb91e5f9ffd
Content: Create custom roles for Azure RBAC | Microsoft Docs
Content Source: articles/active-directory/role-based-access-control-custom-roles.md
Service: active-directory
GitHub Login: @rolyon
Microsoft Alias: rolyon

@danmyhre
Thanks for the feedback! We are currently investigating and will update you shortly.

@danmyhre Regarding 'scope above the subscription level' - Thanks for the feedback! Can you post this as a feedback @ https://feedback.azure.com/forums/169401-azure-active-directory. This will allow the community to upvote and for the product team to include into their plans. We also have the "Give Product Feedback" button in our documents now to take you directly to the appropriate feedback page.
Regarding 'allow management groups to be used as the scope for a custom role' - Please help with more details what you meant. An example will also help.

@danmyhre Please help with an update.

I just checked back in the portal and I see this feature is now available on my lab tenant!  Still needs to be updated in some documents (e.g. https://docs.microsoft.com/en-us/azure/azure-policy/assign-policy-definition), but this is great.  Now I have all sorts of work to do today configuring policy  :)

I added this to feedback site.
https://feedback.azure.com/forums/169401-azure-active-directory/suggestions/33644002-custom-roles-at-the-management-group-level
Don't forget to get go vote for it!

@MicrosoftDocs/azure-cxp-triage #please-close
This issue does not require further work.

Can assignable scope also be done on the Resource group level where folks with resource group level access can access the network watcher?

Is it also possible to scope this per region ? For example if #1 is true, and users are in the USA they can only manage network watcher in the USA region but not any other country.


Command exec - multiple command in a single yaml file

Hi,
I am trying to execute multiple commands(goss) in a single yaml file, but not successful in it.
When validate, i get only the output for "python" and not for "datetimectl"
####################################################
Output:
Command: version: exit-status: matches expectation: [0]
Command: version: stdout: matches expectation: [Python 3.8.13]
#######################################################
Can someone suggest what am i doing wrong here.
command:
  version:
    exit-status: 0
    exec: timedatectl
    stdout:
     - "NTP service: active"
    stderr: []
    exec: python --version
    stdout:
     - "Python 3.8.13"
    stderr: []

Thanks in Advance!!

You need to make 2 command blocks for this
command:
  python --version:
    stdout:
    - 'Python 3.8.13'
  timedatectl:
    exit-status: 0
    stdout:
    - 'NTP service: active'

command:
  python --version:
    stdout:
    - 'Python 3.8.13'
  timedatectl:
    exit-status: 0
    stdout:
    - 'NTP service: active'

It works now. Thanks you for the quick response. Really appreciate it!!!

It works now. Thanks you for the quick response. Really appreciate it!!!


Suggestion: OSRS Soundtrack Playlist

A plugin to create playlists for the OSRS in game tracks.
RS3 has a feature to right click a track and add it to a playlist.
I would love to have this implemented into Runelite somehow.

Duplicate of #6093
The music engine for OSRS is really really painful to mess with, sadly. An external listening method is much easier and better.


kubepug: 1.3.4 -> 1.4.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/rikatz/kubepug/releases.
meta.description for kubepug is: "Checks a Kubernetes cluster for objects using deprecated API versions"
meta.homepage for kubepug is: "https://github.com/rikatz/kubepug"
meta.changelog for kubepug is: ""
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.4.0 with grep in /nix/store/d0b67x2prz5kzqwghxch553s12x4zf8d-kubepug-1.4.0
found 1.4.0 in filename of file in /nix/store/d0b67x2prz5kzqwghxch553s12x4zf8d-kubepug-1.4.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
kubepug

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/d0b67x2prz5kzqwghxch553s12x4zf8d-kubepug-1.4.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A kubepug https://github.com/r-ryantm/nixpkgs/archive/259c2e336ff6af8f474a15e92098ef59ed124120.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/d0b67x2prz5kzqwghxch553s12x4zf8d-kubepug-1.4.0
ls -la /nix/store/d0b67x2prz5kzqwghxch553s12x4zf8d-kubepug-1.4.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

kubepug

Maintainer pings
cc @mausch for testing.

Tested, LGTM


Does it support "SELECT * FROM 11111.table1"  ?

Does it support "SELECT * FROM 11111.table1"  ?
I get this erorr:
SQL parsing error:syntax error at position 21 near '11111.'

I don't think that's a valid database/table identifier. Try wrapping it in backticks.
SELECT * FROM `11111`.table1

OK, I will try it

SELECT * FROM 11111.table1
Thanks it works.

Can you close this issue in that case? It's a bit distracting, when looking at the open issues on this repo

Working as intended


ESP32-S3 pairing using Just Works method failed

Hello, I’m having a bit of trouble pairing my camera with the esp32-s3. I’m trying to initiate pairing using the Just Works method, but it seems my camera is not receiving the request.
Here is the key part of the code:
NimBLEDevice::setSecurityAuth(true, false, true);
pClient->connect(NimBLEAddress(serverAddress), true);
pClient->secureConnection()
uint32_t err = pClient->getLastError();
Serial.println(err, HEX);

The serial terminal returns ‘D’.
But I can connect and respond normally using Android/Windows devices.

Here is my complete code:

#include <NimBLEDevice.h>

const char *serverAddress = "d8:10:68:1e:7a:8c"; // Target server's MAC address

int scanTime = 5;  // Scan time in seconds
BLEScan *pBLEScan; // BLE scan object pointer

uint16_t CAMERA_MANUFACTURER_ID = 0x012D; // Camera manufacturer ID

// Custom advertised device callback class for handling scanned device information
class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks
{
  void onResult(BLEAdvertisedDevice *advertisedDevice) override
  {
    // Check if the device has manufacturer data and the data size is at least 4 bytes
    if (advertisedDevice->haveManufacturerData() && advertisedDevice->getManufacturerData().size() >= 4)
    {
      std::string manData = advertisedDevice->getManufacturerData(); // Get manufacturer data
      // Check if the manufacturer data matches a specific value
      if (manData[0] == 0x2D && manData[1] == 0x01 && manData[2] == 0x03 && manData[3] == 0x00)
      {
        // Get and print the device name
        std::string deviceName = advertisedDevice->getName();
        Serial.print("Device Name: ");
        Serial.println(deviceName.c_str());

        // Get and print the device address
        BLEAddress macAddress = advertisedDevice->getAddress();
        Serial.print("Device Address: ");
        Serial.print(macAddress.toString().c_str());
        Serial.println("");
      }
    }
  }
};

void setup()
{
  Serial.begin(115200); // Initialize serial communication, set baud rate to 115200
  NimBLEDevice::init("ESP32");
  pBLEScan = BLEDevice::getScan();                                           // Create a new scan object
  pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); // Set advertised device callbacks
  pBLEScan->setActiveScan(true);                                             // Set to active scan
  pBLEScan->setInterval(100);                                                // Set scan interval
  pBLEScan->setWindow(99);
  // Start scanning, set scan time to scanTime seconds, do not repeat scanning
  BLEScanResults foundDevices = pBLEScan->start(scanTime, false);
  Serial.print("Devices found: "); // Print the number of devices found
  Serial.println(foundDevices.getCount());
  Serial.println("Scan done!"); // Scan completion message

  // Create a NimBLEClient object for connecting to the server
  NimBLEClient *pClient = BLEDevice::createClient();

  NimBLEDevice::setSecurityAuth(true, false, true);
  // Connect to the specified server address and set auto-reconnect
  pClient->connect(NimBLEAddress(serverAddress), true);

  Serial.println("Starting pairing process");

  pClient->setConnectTimeout(30);
  if (pClient->secureConnection())
  {
    Serial.println("Pairing successful"); // Pairing request successful message
  }
  else
  {
    Serial.println("Pairing failed");
    uint32_t err = pClient->getLastError();
    Serial.print("Error Code: ");
    Serial.println(err, HEX); // Print error code
  }
}

void loop()
{
}

Does the camera support "just-works" pairing? The error code is suggesting a timeout so it looks like it's not responding.

相机是否支持“just-works”配对？错误代码建议超时，因此看起来没有响应。

I can basically confirm that my device uses the just-works pairing method, and I’ve tried several other pairing methods without any response from my device. However, pairing with Android/Windows devices works normally. Moreover, I found another person online who wrote a program using the adafruit_feather_nrf52840 development board. In his code, I saw that he pairs the device using:
if (_attempt_pairing == true)
{
    conn->requestPairing();
}

without adding any parameters. But when I tried using the
pClient->secureConnection()

function from the nimble library, it did not initiate a pairing request.

I couldn’t find a function in Nimble to query the pairing method of the connected device. However, it seems that Nimble handles secure pairing automatically, and I’m not sure why it’s not working with my device.

Try changing this: NimBLEDevice::setSecurityAuth(true, false, true); to NimBLEDevice::setSecurityAuth(true, false, false);

Thank you for your suggestion, but I still couldn’t pair after trying. During this period, I tried many methods. I found that pairing is possible when using the Bluedroid library with the BLEDevice::setEncryptionLevel(ESP_BLE_SEC_ENCRYPT) method. However, when switching to the NimBLE library, it still does not work.
Here is my code:
Bluedroid ：
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEScan.h>
#include <BLEAdvertisedDevice.h>

int scanTime = 5;        // Scan time in seconds
int actionGapTime = 250; // Action interval time in milliseconds, a typical debounce time

// To-do: Add more camera models
int cameraModelsSize = 1;
String cameraModels[] = {
    "ZV-E10",
};

static BLEScan *pBLEScan;
static BLERemoteCharacteristic *pRemoteCharacteristic;
static BLEClient *pClient;
static BLEAddress *pServerAddress;

bool doConnect = false; // Flag to indicate whether to connect
bool paired = false;    // Flag to indicate whether pairing has occurred
bool connected = false; // Flag to indicate whether the connection is established

// Callback class for advertised devices
class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks
{
    void onResult(BLEAdvertisedDevice advertisedDevice)
    {
        // Get the device name
        String name = advertisedDevice.getName().c_str();

        // Check if the device is in the cameraModels list
        for (int i = 0; i < cameraModelsSize; i++)
        {
            if (name.indexOf(cameraModels[i]) != -1)
            {
                pServerAddress = new BLEAddress(advertisedDevice.getAddress());

                // Stop scanning
                pBLEScan->stop();
                Serial.println("Device found!");

                doConnect = true;
            }
        }
    }
};

// Security callback class
class MySecurity : public BLESecurityCallbacks
{
    bool onConfirmPIN(uint32_t pin)
    {
        Serial.println("Confirm PIN");
        return true;
    }

    uint32_t onPassKeyRequest()
    {
        Serial.println("Passkey request");
    }

    void onPassKeyNotify(uint32_t pass_key)
    {
        Serial.println("Passkey notify");
    }

    bool onSecurityRequest()
    {
        Serial.println("Security request");

        return true;
    }
    // Structure associated with ESP AUTH CMPL EVT
    void onAuthenticationComplete(esp_ble_auth_cmpl_t cmpl)
    {
        Serial.println("Authentication complete");
        ESP_LOGI(LOG_TAG, "Start BLE work!");
        if (cmpl.success)
        {
            Serial.println("Authentication complete -> Success");
            paired = true;
        }
        else
        {
            Serial.println("Authentication complete -> Failure");
        }
    }
};

// Function to connect to the server
bool connectToServer(BLEAddress pAddress)
{
    // Create a new instance of the client
    pClient = BLEDevice::createClient();
    pClient->connect(pAddress);
    Serial.println("Connected to device!");
    Serial.println("Waiting for services...");

    // Get the service UUID
    BLERemoteService *pRemoteService = pClient->getService("8000ff00-ff00-ffff-ffff-ffffffffffff");
    if (pRemoteService == nullptr)
    {
        Serial.println("Could not find our service UUID");
        pClient->disconnect();
        return false;
    }
    Serial.println("Found our service");

    // Get the characteristic UUID
    pRemoteCharacteristic = pRemoteService->getCharacteristic("0000ff01-0000-1000-8000-00805f9b34fb");
    if (pRemoteCharacteristic == nullptr)
    {
        Serial.println("Could not find our characteristic UUID");
        pClient->disconnect();
        return false;
    }
    Serial.println("Found our characteristic");

    return true;
}

// Initialization setup
void setup()
{
    Serial.begin(115200);

    BLEDevice::init("");
    BLEDevice::setEncryptionLevel(ESP_BLE_SEC_ENCRYPT);
    // Set callbacks for handling encryption negotiation events and authentication events
    BLEDevice::setSecurityCallbacks(new MySecurity());
    pBLEScan = BLEDevice::getScan(); // Create a new scan
    pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks());
    pBLEScan->setActiveScan(true); // Active scan uses more power, but gets results faster
    pBLEScan->setInterval(100);
    pBLEScan->setWindow(99); // Must be less than or equal to setInterval value
}

// Main loop
void loop()
{
    // If a device is found, connect to it
    if (doConnect == true && connectToServer(*pServerAddress) && paired)
    {
        connected = true;
        doConnect = false;
    }

    {
        Serial.println("Scanning...");
        pBLEScan->start(scanTime, false);
        Serial.println("not found...");
        pBLEScan->clearResults();
    }
}

nimble
#include <NimBLEDevice.h> // Include the NimBLE library for handling BLE communication

NimBLERemoteService *pSvc = nullptr;
NimBLERemoteCharacteristic *pChr = nullptr;
NimBLERemoteDescriptor *pDsc = nullptr;

// Representation of the BLE advertised device found during scanning
// When we perform a BLE scan, the result will be a set of devices that are advertising. This class provides the model for the detected devices
static NimBLEAdvertisedDevice *advDevice;

int scanTime = 5; // Scan time in seconds
static bool doConnect = false;

uint16_t CAMERA_MANUFACTURER_ID = 0x012D; // Camera manufacturer ID

void scanEndedCB(NimBLEScanResults results);

class ClientCallbacks : public NimBLEClientCallbacks
{
  void onConnect(NimBLEClient *pClient)
  {
    Serial.println("Connected");
    pClient->updateConnParams(120, 120, 0, 60);
  };

  void onDisconnect(NimBLEClient *pClient)
  {
    Serial.print(pClient->getPeerAddress().toString().c_str());
    Serial.println(" Disconnected, starting scan");
    NimBLEDevice::getScan()->start(scanTime, scanEndedCB);
  };

  bool onConnParamsUpdateRequest(NimBLEClient *pClient, const ble_gap_upd_params *params)
  {
    if (params->itvl_min < 24)
    { /** 1.25ms units */
      return false;
    }
    else if (params->itvl_max > 40)
    { /** 1.25ms units */
      return false;
    }
    else if (params->latency > 2)
    { /** Number of intervals allowed to skip */
      return false;
    }
    else if (params->supervision_timeout > 100)
    { /** 10ms units */
      return false;
    }

    return true;
  };

  uint32_t onPassKeyRequest()
  {
    Serial.println("Client passkey request");
    /** return the passkey to send to the server */
    return 123456;
  };

  bool onConfirmPIN(uint32_t pass_key)
  {
    Serial.print("Confirm passkey: ");
    Serial.println(pass_key);
    /** Return false if passkeys don't match. */
    return true;
  };

  /** The pairing process is complete, we can view the results in the ble gap conn desc */
  void onAuthenticationComplete(ble_gap_conn_desc *desc)
  {
    if (!desc->sec_state.encrypted)
    {
      Serial.println("Encrypted connection failed, disconnecting");
      /** Find the client using the connection handle provided in desc */
      NimBLEDevice::getClientByID(desc->conn_handle)->disconnect();
      return;
    }
  };
};

/** Create a single global instance of the callback class for all clients to use */
static ClientCallbacks clientCB;

/** Callback to handle the results of the last scan or to restart it */
void scanEndedCB(NimBLEScanResults results)
{
  Serial.println("Scan has ended");
}

// Custom advertised device callback class to handle the information of scanned devices
class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks
{
  void onResult(NimBLEAdvertisedDevice *advertisedDevice)
  {
    // Check if the device has manufacturer data and the data is at least 4 bytes long
    if (advertisedDevice->haveManufacturerData() && advertisedDevice->getManufacturerData().size() >= 4)
    {
      std::string manData = advertisedDevice->getManufacturerData(); // Get the manufacturer data
      // Check if the manufacturer data matches a specific value
      if (manData[0] == 0x2D && manData[1] == 0x01 && manData[2] == 0x03 && manData[3] == 0x00)
      {
        Serial.print("Found advertised device: ");
        advDevice = advertisedDevice;
        doConnect = true;
        // Get and print the device name
        std::string deviceName = advertisedDevice->getName();
        Serial.print("Device name: ");
        Serial.println(deviceName.c_str());

        // Get and print the device address
        BLEAddress macAddress = advertisedDevice->getAddress();
        Serial.print("Device address: ");
        Serial.print(macAddress.toString().c_str());
        Serial.println("");
        NimBLEDevice::getScan()->stop();
      }
    }
  }
};

/** Handle client configuration and connect the interface to the server */
void connectToServer()
{
  NimBLEClient *pClient = nullptr;
  if (!pClient)
  { // Get the number of created client objects
    if (NimBLEDevice::getClientListSize() >= NIMBLE_MAX_CONNECTIONS)
    {
      Serial.println("Maximum clients reached, no available connections");
    }

    pClient = NimBLEDevice::createClient();

    Serial.println("New client created");

    pClient->setClientCallbacks(&clientCB, false);
    pClient->setConnectionParams(12, 12, 0, 51);
    pClient->setConnectTimeout(5);
    if (!pClient->connect(advDevice))
    {
      NimBLEDevice::deleteClient(pClient);
      Serial.println("Connection failed, client deleted");
    }
  }
  // Are we connected to the server?
  if (!pClient->isConnected())
  {
    if (!pClient->connect(advDevice))
    {
      Serial.println("Connection failed");
    }
  }

  Serial.print("Connected to: ");
  Serial.println(pClient->getPeerAddress().toString().c_str());
  Serial.print("RSSI: ");
  Serial.println(pClient->getRssi());

  if (pClient->secureConnection())
  {
    Serial.println("Pairing successful");
  }
  else
  {
    Serial.println("Pairing failed");
  }
}

void setup()
{
  Serial.begin(115200); // Initialize serial communication, set baud rate to 115200
  Serial.println("Scanning for devices with specific manufacturer data..."); // Print prompt message
  NimBLEDevice::init("");
  NimBLEDevice::setSecurityAuth(false, false, true); // Set encryption level
  NimBLEDevice::setPower(ESP_PWR_LVL_P9);            // Set power level to +9db
  NimBLEScan *pScan = NimBLEDevice::getScan();
  pScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); // Set advertised device callbacks
  pScan->setActiveScan(true);
  pScan->setInterval(45);
  pScan->setWindow(15);
  pScan->start(scanTime, scanEndedCB);
}

void loop()
{
  if (doConnect == true)
  {
    doConnect = false;
    // Found a device we want to connect to, connect now
    connectToServer();
  }
}

Okay lets try some changes here, since the issue is a timeout occurring we should look at the connection parameters.
Lets start with:
  bool onConnParamsUpdateRequest(NimBLEClient *pClient, const ble_gap_upd_params *params)
  {
    if (params->itvl_min < 24)
    { /** 1.25ms units */
      return false;
    }
    else if (params->itvl_max > 40)
    { /** 1.25ms units */
      return false;
    }
    else if (params->latency > 2)
    { /** Number of intervals allowed to skip */
      return false;
    }
    else if (params->supervision_timeout > 100)
    { /** 10ms units */
      return false;
    }

    return true;
  };

Change this to just return true so the camera can have the parameters it likes:
  bool onConnParamsUpdateRequest(NimBLEClient *pClient, const ble_gap_upd_params *params)
  {
    return true;
  };

Now lets remove these lines:
    pClient->setConnectionParams(12, 12, 0, 51);
    pClient->setConnectTimeout(5);

After this please set the log level to debug and see what happens.

After attempting to delete, I still cannot connect. Here is my log:
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd0108,len:0x1654
load:0x403b6000,len:0xed4
load:0x403ba000,len:0x32dc
entry 0x403b632c
I (25) boot: ESP-IDF v4.4.1-405-g6c5fb29c2c 2nd stage bootloader
I (25) boot: compile time 04:22:20
I (25) boot: chip revision: 0
I (28) qio_mode: Enabling default flash chip QIO
I (33) boot.esp32s3: Boot SPI Speed : 80MHz
I (38) boot.esp32s3: SPI Mode       : QIO
I (43) boot.esp32s3: SPI Flash Size : 8MB
I (47) boot: Enabling RNG early entropy source...
I (53) boot: Partition Table:
I (56) boot: ## Label            Usage          Type ST Offset   Length
I (64) boot:  0 nvs              WiFi data        01 02 00009000 00005000
I (71) boot:  1 otadata          OTA data         01 00 0000e000 00002000
I (79) boot:  2 ota_0            OTA app          00 10 00010000 00200000
I (86) boot:  3 ota_1            OTA app          00 11 00210000 00200000
I (94) boot:  4 uf2              factory app      00 00 00410000 00040000
I (101) boot:  5 ffat             Unknown data     01 81 00450000 003b0000
I (109) boot: End of partition table
I (613) esp_image: segment 0: paddr=00010020 vaddr=3c060020 size=1934ch (103244) map
I (629) esp_image: segment 1: paddr=00029374 vaddr=3fc96e40 size=04a94h ( 19092) load
I (633) esp_image: segment 2: paddr=0002de10 vaddr=40374000 size=02208h (  8712) load
I (636) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=5ae1ch (372252) map
I (699) esp_image: segment 4: paddr=0008ae44 vaddr=40376208 size=10c2ch ( 68652) load
I (720) boot: Loaded app from partition at offset 0x10000
I (721) boot: Disabling RNG early entropy source...
[   739][D][esp32-hal-tinyusb.c:680] tinyusb_enable_interface(): Interface CDC enabled
E (747) esp_core_dump_flash: No core dump partition found!
E (747) esp_core_dump_flash: No core dump partition found!
[   748][D][esp32-hal-tinyusb.c:569] tinyusb_load_enabled_interfaces(): Load Done: if_num: 2, descr_len: 75, if_mask: 0x10
I NimBLEDevice: BLE Host Task Started
I NimBLEDevice: NimBle host synced.
D NimBLEDevice: Setting bonding: 0, mitm: 0, sc: 1
D NimBLEDevice: >> setPower: 11 (type: 11)
D NimBLEDevice: << setPower
D NimBLEScan: >> start: duration=5
D NimBLEScan: << start()
I NimBLEScan: New advertiser: d8:10:68:1e:7a:8c
I NimBLEScan: Updated advertiser: d8:10:68:1e:7a:8c
D NimBLEScan: >> stop()
D NimBLEClient: >> connect(d8:10:68:1e:7a:8c)
D NimBLEScan: << stop()
D NimBLEClient: Got Client event
I NimBLEClient: Connected event
D NimBLEClient: Got Client event
I NimBLEClient: mtu update event; conn_handle=1 mtu=255
I NimBLEClient: Connection established
D NimBLEClient: >> deleteServices
D NimBLEClient: << deleteServices
D NimBLEClient: << connect()
D NimBLEClient: >> getRssi()
D NimBLEClient: >> getService: uuid: 8000ff00-ff00-ffff-ffff-ffffffffffff
D NimBLEClient: >> retrieveServices
D NimBLEClient: Service Discovered >> status: 0 handle: 66
D NimBLERemoteService: >> NimBLERemoteService()
D NimBLERemoteService: << NimBLERemoteService(): 8000ff00-ff00-ffff-ffff-ffffffffffff
D NimBLEClient: Service Discovered >> status: 14 handle: -1
D NimBLEClient: << Service Discovered
D NimBLEClient: << retrieveServices
D NimBLERemoteService: >> getCharacteristic: uuid: 0000ff01-0000-1000-8000-00805f9b34fb
D NimBLERemoteService: >> retrieveCharacteristics() for service: 8000ff00-ff00-ffff-ffff-ffffffffffff
D NimBLERemoteService: Characteristic Discovered >> status: 14 handle: -1
D NimBLERemoteService: << Characteristic Discovered
D NimBLERemoteService: << retrieveCharacteristics()
D NimBLERemoteService: >> retrieveCharacteristics() for service: 8000ff00-ff00-ffff-ffff-ffffffffffff
D NimBLEClient: Got Client event
I NimBLEClient: Connection parameters updated.
D NimBLERemoteService: Characteristic Discovered >> status: 0 handle: 71
D NimBLERemoteCharacteristic: >> NimBLERemoteCharacteristic()
D NimBLERemoteCharacteristic: << NimBLERemoteCharacteristic(): 0xff01
D NimBLERemoteService: Characteristic Discovered >> status: 14 handle: -1
D NimBLERemoteService: << Characteristic Discovered
D NimBLERemoteService: << retrieveCharacteristics()
D NimBLEClient: >> secureConnection()
D NimBLEClient: Got Client event
E NimBLEClient: secureConnection: failed rc=13
D NimBLEClient: Got Client event
I NimBLEClient: disconnect; reason=531,

Thanks, one more thing to try as I suspect the error code here is actually from the peer as it is trying to secure the connection at the same time that you are then that code would mean the procedure is already in progress.
So let's remove this:
  if (pClient->secureConnection())
  {
    Serial.println("Pairing successful");
  }
  else
  {
    Serial.println("Pairing failed");
  }

And see what happens. Notice that you didn't need to force the connection security with Bluedroid.

Translation: I want to confirm whether writing the hexadecimal value 0x0107 is done by using
uint8_t data[] = { 0x01, 0x07 }; pChr->writeValue(data, sizeof(data)).
Then I encountered some issues. After deleting that line of code, the ESP32 still did not request pairing. After I requested a write, the serial terminal returned normally with
NimBLERemoteCharacteristic: >> writeValue(), length: 2,
but the camera did not perform any action. It is supposed to execute a focusing operation, which I am quite certain about, as I have confirmed it through various methods.
If I use pChr->writeValue(data, sizeof(data), true), then the library will automatically execute
NimBLEClient: >> secureConnection(), but the camera remains the same as before and does not receive any requests.
Another issue is that notifications cannot be received. However, after pairing using the Bluedroid library, if the pairing information is not reset on the camera, then the return messages for the subscribed characteristics can be received.


不能下载视频也不能下载弹幕了

问题反馈
在您提交问题前, 请检查以下项目:

[x] 您在报告一个 bug 或者提交一个功能请求. 如果您需要一般性的帮助, 请直接和我们联系或者在项目首页下留言.
[x] 您的问题在与现有问题并不重复. 如果已有一个相同话题的问题, 请直接在其下留言.
[x] 如果您在报告一个 bug 请确定它可以在最新的发行版或 master 分支下重现. 同时, 请详细说明重现问题的步骤 (如果有屏幕截图的话就更好了).
[x] 您已填写了系统环境信息.

环境信息
请填写以下信息:

操作系统 (Windows/macOS/Linux):
浏览器版本(您可以在 [菜单/帮助/关于] 下查看):
扩展版本:

您可以在扩展选项页中查看.
重现步骤/尝试的解决方案
请具体描述, 谢谢 :)
Feedback
Before submitting your issue, please check to make sure of the following:

[x] You are reporting a bug or making a feature request. If you are looking for general support, please contact us directly or comment at our project homepage.
[x] Your issue is not a duplicate of an existing issue. If there is an open issue of the same topic, please just comment under it.
[x] If you are reporting a bug, please make sure it can be reproduced in the latest release or master branch. Also, please specify detailed procedures to reproduce the bug (screenshots would be greatly appreciated).
[x] You have filled out your system environment info.

Environment Info
Please fill out the following:

Operating System (Windows/macOS/Linux):
Chrome Version (You can check this under [Menu/Help/About]):
Extension Version:

You can see this on extension options page. You can also put the latest commit ID here if you are reporting about the master branch.
Steps to Reproduce / Attempted solution
Please be specific here, thanks :)

请您根据问题反馈表单填写和描述具体的信息和内容


When call ProxyOnRequestHeaders get wrong action

action
cd example and replace the wasm file to new file which handles HTTP headers like this. Then go run . run the example.
expected behaviour
If the header hit, Action::Pause will be returned from wasm side. ActionPause will be returned by the function ProxyOnRequestHeaders.
actual behaviour
Regardless of whether the expected header appears.  ActionContinue will be returned by the function ProxyOnRequestHeaders
about the code
I noticed that the action ProxyOnRequestHeaders returned is actually from CallWasmFunction, and res is ignored.
Whether action should be ignored, the value of res should be converted into action format and returned. And what is a.Imports.Wait() actually do, is there any example for it?

I've noticed that, thanks. That's exactly a question for your rust example. And maybe we should consider the return value of both proxy_on_request_headers and a.Imports.Wait() on ABIContext.ProxyOnRequestHeaders, instead of simply taking the return value of a.Imports.Wait(), and ignoring proxy_on_request_headers.
a.Imports.Wait() is actually for async callout from the wasm module. For example, if you make a HTTP callout in your wasm module, then the go-host should launch the HTTP call, and wait for a response synchronously, and that's the Wait function exactly do. In this case, the ActionContinue from proxy_on_request_headers should be ignored, since you're waiting for the response of the previous HTTP callout to make further decision.

Thanks for your reply. When I stress test the code, whether it uses the original wasm or my own, memory leaks will occur. Do you have any ideas about it?

@Taction this module is incompatible with any current version of proxy-wasm. The only thing I could get to build is an old version of 0.1.0. I would suggest working with mosn project leads to allow an alternate implementation in mosn. That or we add https://http-wasm.io/http-handler/ and leave proxy-wasm alone. Since you are an end user I think best you help drive action here. cc @taoyuanyuan
package main

import (
	"strconv"

	"github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm"
	"github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm/types"
)

// build main like below with proxy-wasm-go-sdk v0.0.14 which withes with
// TinyGo 0.19.0 (which works with Go 1.16).
//
//	tinygo build -o main.wasm -scheduler=none -target=wasi -tags 'abi_010' --no-debug ./main.go
//
// Note: Old tooling is needed because mosn.io/proxy-wasm-go-host v2 is
// incompatible with the proxy-wasm specification.
func main() {
	proxywasm.SetNewHttpContext(newHttpContext)
}

type myHttpContext struct {
	// you must embed the default context so that you need not to re-implement all the methods by yourself
	proxywasm.DefaultHttpContext
	contextID uint32
}

func newHttpContext(rootContextID, contextID uint32) proxywasm.HttpContext {
	return &myHttpContext{contextID: contextID}
}

func (ctx *myHttpContext) OnHttpRequestHeaders(numHeaders int, endOfStream bool) types.Action {
	key := "Wasm-Context"
	err := proxywasm.SetHttpRequestHeader(key, strconv.Itoa(int(ctx.contextID)))
	if err != nil {
		proxywasm.LogCritical("failed to set request header: " + key)
	}
	return types.ActionContinue
}


Key Manager OKTA doesn't work when used outside Default Application in DevPortal

Description:
Custom Key Manager OKTA doesn't work when API is subscribed to application other than Default Application in DevPortal.
Steps to reproduce:

Login to admin portal using admin credentials.
Register OKTA key manager by details collected from OKTA. Ensure the steps mentioned here is followed.
Keep Token Generation, Out Of Band Provisioning, Oauth App Creation options enabled.
Login to Publisher Portal using admin credentials.
Deploy the PizzaShack API.
Go to Run time configurations, Under application security, Keep only OKTA Key manager allowed for API.
Save and Publish the API.
Login to Developer Portal using admin credentials.
Create a new Application for OKTA exactly as mentioned here https://apim.docs.wso2.com/en/latest/administer/key-managers/configure-okta-connector/.
Subscribe the PizzaShack API to the new application.
Generate the access token for a OKTA end user directly via okta API.

OKTA end user is not available in WSO2 user store.
And not using wso2 devportal to generate the acces token.

Make a request to pizzashack api using the generated access token.
WSO2 shows the below error,

<ams:fault xmlns:ams="http://wso2.org/apimanager/security">
    <ams:code>900908</ams:code>
    <ams:message>Resource forbidden </ams:message>
    <ams:description>User is NOT authorized to access the Resource. API Subscription validation failed.</ams:description>
</ams:fault>

Go to devportal and unsubscribe the PizzaShack from new application.
Subscribe the PizzaShack API to default application and save.
Make a request to pizzashack api using the earlier generated access token.
WSO2 respond with API result.

Affected Product Version:
WSO2 APIM 3.2.0
Environment details (with versions):

OS: Windows
Client: Postman
Env (Docker/K8s):NA

Optional Fields
Related Issues:
Suggested Labels:
Bug Defect Priority-High
Suggested Assignees:

Our front end application was using SPA OKTA application to generate the access token. How ever registering this as OKTA key manager was not supported. We followed below steps and made it working.

Create a new OKTA application under same authorization server of type web. Generate API Key, Client ID and Client secret.
Add the OKTA key manager using above details. Disable Oauth App Creation option, as it is not required.
Go to devportal, add a new application. Under OKTA  key manager, select "Provide Existing Auth keys".
Enter the client ID generated for SPA app in OKTA. Keep the consumer secret empty and save.
Subscribe to PizzaShack API an invoke the API using access token generated from SPA OKTA space.
WSO2 accepts the request and respond with the result.
Since the consumer key attached within the access token is used to identify the subscribed application, it is mandatory to provide the consumer key as client id in the respective section.

It would be good, if these information shall be furnished under documentation of "Configuring OKTA as a key manager" section. This issue can be either moved as a document improvement or shall close it.

@anupbvr  yes, Subscription of an API identified from Consumer key of application if you need to provide already existing OAuth app you need to go with steps as mentioned in [1].
[1] - https://apim.docs.wso2.com/en/latest/learn/api-security/oauth2/provisioning-out-of-band-oauth-clients/#provisioning-out-of-band-oauth2-clients


doc(news blog): adds news blog for the release of T-X24.05

Pull-Request for issue: #903

PR adds the respective blog-post for R24.05

Description

Pre-review checks
Please ensure to do as many of the following checks as possible, before asking for committer review:

[ ] DEPENDENCIES are up-to-date. Dash license tool. Committers can open IP issues for restricted libs.
[ ] Copyright and license header are present on all affected files

Please do not forget to add this news to the slider on the home/main page.

Please do not forget to add this news to the slider on the home/main page.

done


Descriptions for claims

Claims need a description, not just a title. Often terms need clarification if the definition isn't clear. Or we need clarification about how much of whatever is enough to "count". Or a host of other reasons that the details might not fit in a title that's short enough to put on the summary screen.
Possibly another field for "relevant info that's not part of the claim text", such as links about background info that traders might care about. I'm actually of mixed opinion on whether that's a good idea, but you definitely don't want it cluttering up the claim text and having people trying to sort out whether that info is directly relevant to judging.

Absolutely, it's unacceptable to be missing detailed descriptions by the time real money starts trading.
We've been working under the assumption that storing descriptions on chain is prohibitively expensive.  I briefly looked into using ipfs to store it a few weeks ago, but direct access to ipfs from a javascript client was unsupported at the time.
The decision from there was to wait for one of these data storage options to mature: ipfs, swarm (ethereum shared file store), or a centralized augur data store.

Why would it be expensive? Data storage on the Bitcoin blockchain is perhaps as high as a penny per kB; I don't see why Ethereum should be any worse. The available budget for market creators to pay for useful stuff is at least several dollars, for any contract worth the time to write up.
Augur could also just run their own pastebin-ish thing for now, that includes support for generating SHA hashes and looking up by hash, and just reference the hash of the claim text on-chain for now. You can always add something fancier / more robust later.

An op return on Bitcoin is 40 bytes per tx, not kb, so not super cheap.  Hashing is the way to do this.

Eh, the whole blockchain is just data. It's all priced per kB. Just abuse the multsig capabilities (1-of-10, anyone?) or something. Presumably Ethereum will let you do something less dumb, but it doesn't really matter.
Hashing is a bit better, but text is small and cheap.

Average transaction fee is $0.03 1024/80 = 12.8 op returns to make up 1 kb of extra data, ~38 cents.  One byte of storage on eth is 25000 gas to initialize (much cheaper to modify), to have equivalent on btc that'd be ~ 25600000 or 256 ether.  Aka not cheap and hashing is the way to go.

My understanding is that Swarm is working and accessible from geth's RPC API. If true, that could get around IPFS problems.

Just looked, I don't see it anywhere. Centralized w/ hash verification until ipfs/swarm are further along is prob the way to go

Found a PR for swarm. It's waiting to be merged then eth will have swarm support

duplicate of #148


[SERF-396] gRPC Tracing interceptors

Description
Introduce gRPC tracing interceptors from the official Datadog gRPC package.
References

SERF-396
git.lo/go-sdk!95

Superseded by https://github.com/scribd/go-sdk/pull/31.


No need for Ownable()

When constructor of inherited contract does not take any arguments, it is called automatically.
https://github.com/OpenFinanceIO/smart-securities-standard/blob/4c4ea4cf814a79a380354296173530a94349f003/contracts/Exporter.sol#L22

See #19


fixed types

Hi @wouterpeere ,
There are two small typos:
pd.Series(pd.date_range(START, END, freq="1H"))
has to be:
pd.Series(pd.date_range(START, END, freq="1h"))
otherwise it will raise an pandas error.
and the rectangle field gets floats instead of ints as inputs for the spacing.
Best regards
@tblanke

Hi @tblanke
Thanks! I will go over it this weekend.
Best,
Wouter


Coredump when permission denied in old log cleaning

Describe the bug
Recently I soft-linked a directory that belongs to another user to my home folder, and rime engine can't startup after a reboot.
I have debugged the coredump file and got the following informations.
    at /usr/src/debug/gcc/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/new_allocator.h:104
        ec = std::error_code = {"generic": EACCES}
        result = {_M_type = <optimized out>, _M_perms = <optimized out>}
#9  0x00007901d5d71ec1 in std::filesystem::__cxx11::directory_entry::status (this=0x64249dae56c0) at /usr/include/c++/13.2.1/bits/fs_dir.h:279
#10 std::filesystem::__cxx11::directory_entry::_M_file_type (this=0x64249dae56c0) at /usr/include/c++/13.2.1/bits/fs_dir.h:346
#11 std::filesystem::__cxx11::directory_entry::_M_file_type (this=0x64249dae56c0) at /usr/include/c++/13.2.1/bits/fs_dir.h:342
#12 std::filesystem::__cxx11::directory_entry::is_regular_file (this=0x64249dae56c0) at /usr/include/c++/13.2.1/bits/fs_dir.h:222
#13 rime::CleanOldLogFiles::Run (this=<optimized out>, deployer=<optimized out>) at /usr/src/debug/librime/librime/src/rime/lever/deployment_tasks.cc:649
--Type <RET> for more, q to quit, c to continue without paging--c
        file_name = "music"
        entry = @0x64249dae56c0: {_M_path = filesystem::path "./music" = {[0] = ".", [1] = "music"}, _M_type = std::filesystem::file_type::symlink}
        __for_range = @0x7fff1d227af0: {_M_dir = {<std::__shared_ptr_access<std::filesystem::__cxx11::_Dir, (__gnu_cxx::_Lock_policy)2, false, false>> = {<No data fields>}, _M_ptr = 0x64249dae5690, _M_refcount = {_M_pi = 0x64249dae5680}}}
        __for_begin = {_M_dir = {<std::__shared_ptr_access<std::filesystem::__cxx11::_Dir, (__gnu_cxx::_Lock_policy)2, false, false>> = {<No data fields>}, _M_ptr = 0x64249dae5690, _M_refcount = {_M_pi = 0x64249dae5680}}}
        __for_end = {_M_dir = {<std::__shared_ptr_access<std::filesystem::__cxx11::_Dir, (__gnu_cxx::_Lock_policy)2, false, false>> = {<No data fields>}, _M_ptr = <optimized out>, _M_refcount = {_M_pi = <optimized out>}}}
        files = std::vector of length 0, capacity 0
        dir = <optimized out>
        __for_range = std::vector of length 2, capacity 2 = {"/tmp/", "./"}
        __for_begin = Python Exception <class 'gdb.error'>: value has been optimized out

        __for_end = Python Exception <class 'gdb.error'>: value has been optimized out

        success = <optimized out>
        ymd = ".20240512\000\000"
        now =<PHONE_NUMBER>
        today = ".20240512"
        dirs = std::vector of length 2, capacity 2 = {"/tmp/", "./"}
        removed = <optimized out>

So I think the problem is caused by https://github.com/rime/librime/blob/master/src/rime/lever/deployment_tasks.cc#L647
It got a permission denied while judging whether the path is a symbolic link, and blew up
Flavor(please complete the following information):
Select your flavor:

[x] ibus-rime
[ ] fcitx-rime
[ ] fcitx5-rime
[ ] Squirrel
[ ] Trime
[ ] Weasel

Package:

OS: ArchLinux
Version: rolling
URI: https://archlinux.org/packages/extra/x86_64/ibus-rime/

Not a use case that librime supports.


Update how-to-install-iot-edge-ubuntuvm.md

Adding missing '-'

The update looks correct; merging the PR.
Thanks @jantielens.


Enable Travis

Hi,
Following https://github.com/JuliaIO/Roadmap/issues/3#issuecomment-477745240
https://travis-ci.com/JuliaIO/LibSerialPort.jl
should be enabled
and https://github.com/JuliaIO/LibSerialPort.jl/blame/master/README.md#L1 should be changed
Kind regards

Thanks @samuelpowell for setting up Travis here. I don't have time ATM, but I think we need to set the right udev rules for permission to access the tty on linux.

Okay, perhaps fixed in #32 - both Linux and MacOS now fail with the same errors. Is this better than before or have I broken something further?

Fixed in #32


Fix version prop

Closes #1050
This should fix the GUI issues introduced by #1046. Vistrail gets a new method search_upgrade_versions() which allows searching the whole upgrade chain until the supplied function returns a value. That function is used in version_prop.py and vistrail_controller.py to find notes and tags.
If changing notes or tags, it will be moved from its current location in the upgrade chain to the original version node (the one that's not an upgrade).
Weird things shouldn't happen, even if you have several notes/tags in the same chain, although you may have to disable "don't show upgrades" to be able to select these nodes.

Note: this goes in v2.2 first (PR targets master)


ResetReason not dealing with all reset alternatives panics when reason is esp_reset_reason_t_ESP_RST_USB

On reset reason translation from IDF code to ResetReason struct at https://github.com/esp-rs/esp-idf-hal/blob/master/src/reset.rs#L34 the code panics if the reset reason is not in a subset of all reasons. In the bindings.rs generated from esp-idf-sys version "0.34.1" the reasons are:
#[doc = "!< Reset reason can not be determined"]
pub const esp_reset_reason_t_ESP_RST_UNKNOWN: esp_reset_reason_t = 0;
#[doc = "!< Reset due to power-on event"]
pub const esp_reset_reason_t_ESP_RST_POWERON: esp_reset_reason_t = 1;
#[doc = "!< Reset by external pin (not applicable for ESP32)"]
pub const esp_reset_reason_t_ESP_RST_EXT: esp_reset_reason_t = 2;
#[doc = "!< Software reset via esp_restart"]
pub const esp_reset_reason_t_ESP_RST_SW: esp_reset_reason_t = 3;
#[doc = "!< Software reset due to exception/panic"]
pub const esp_reset_reason_t_ESP_RST_PANIC: esp_reset_reason_t = 4;
#[doc = "!< Reset (software or hardware) due to interrupt watchdog"]
pub const esp_reset_reason_t_ESP_RST_INT_WDT: esp_reset_reason_t = 5;
#[doc = "!< Reset due to task watchdog"]
pub const esp_reset_reason_t_ESP_RST_TASK_WDT: esp_reset_reason_t = 6;
#[doc = "!< Reset due to other watchdogs"]
pub const esp_reset_reason_t_ESP_RST_WDT: esp_reset_reason_t = 7;
#[doc = "!< Reset after exiting deep sleep mode"]
pub const esp_reset_reason_t_ESP_RST_DEEPSLEEP: esp_reset_reason_t = 8;
#[doc = "!< Brownout reset (software or hardware)"]
pub const esp_reset_reason_t_ESP_RST_BROWNOUT: esp_reset_reason_t = 9;
#[doc = "!< Reset over SDIO"]
pub const esp_reset_reason_t_ESP_RST_SDIO: esp_reset_reason_t = 10;
#[doc = "!< Reset by USB peripheral"]
pub const esp_reset_reason_t_ESP_RST_USB: esp_reset_reason_t = 11;
#[doc = "!< Reset by JTAG"]
pub const esp_reset_reason_t_ESP_RST_JTAG: esp_reset_reason_t = 12;

Reasons with code greater than 10 are not included in the translation.
I have a board with an ESP32c3 module that on first boot after flashing it panics. The code is this (https://gitlab.com/scrobotics/optical-makerspace/dark-sky-meter-fw/-/blob/104-app-panics-just-on-first-boot/examples/panics_on_reset_reason.rs?ref_type=heads):
// This example demonstrates a panic that occurs when trying to get the reset reason.
use std::{thread, time};

use esp_idf_sys::{self as _, esp_reset_reason}; // If using the `binstart` feature of `esp-idf-sys`, always keep this module imported

fn main() {
    esp_idf_sys::link_patches();

    let reset_reason_code = unsafe { esp_reset_reason() };
    println!("Reset reason code: {:?}", reset_reason_code);

    let reset_reason = esp_idf_hal::reset::ResetReason::get(); // this panics on first run
    println!("Reset reason: {:?}", reset_reason);

    loop {
        thread::sleep(time::Duration::from_millis(1000)); // So the background task does not starve
    }
}

the output after flashing is:
I (24) boot: ESP-IDF v5.1.2-342-gbcf1645e44 2nd stage bootloader
I (24) boot: compile time Dec 12 2023 10:50:58
I (25) boot: chip revision: v0.4
I (29) boot.esp32c3: SPI Speed      : 40MHz
I (34) boot.esp32c3: SPI Mode       : DIO
I (38) boot.esp32c3: SPI Flash Size : 4MB
[...]

I (436) main_task: Started on CPU0
I (436) main_task: Calling app_main()
Reset reason code: 11
thread 'main' panicked at /home/jorgem/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-idf-hal-0.43.1/src/reset.rs:47:18:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

abort() was called at PC 0x420234a3 on core 0
0x420234a3 - panic_abort::__rust_start_panic::abort
    at /home/jorgem/.rustup/toolchains/nightly-2024-02-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/panic_abort/src/lib.rs:48
[...]

I (24) boot: ESP-IDF v5.1.2-342-gbcf1645e44 2nd stage bootloader
I (24) boot: compile time Dec 12 2023 10:50:58
I (24) boot: chip revision: v0.4
I (28) boot.esp32c3: SPI Speed      : 40MHz
I (33) boot.esp32c3: SPI Mode       : DIO
I (38) boot.esp32c3: SPI Flash Size : 4MB
[...]

I (436) main_task: Started on CPU0
I (436) main_task: Calling app_main()
Reset reason code: 4
Reset reason: Panic

I have also tested with an ESP32-C3-DevKit and the reset reason is different (maybe that is the reason because it has not been issued earlier):
I (32) boot: ESP-IDF v5.1.2-342-gbcf1645e44 2nd stage bootloader
I (32) boot: compile time Dec 12 2023 10:50:58
I (32) boot: chip revision: v0.3
[...]

I (444) main_task: Calling app_main()
Reset reason code: 1
Reset reason: PowerOn

Thanks for reporting!
Yeah that seams to not include all possibility's.
Are you interested in a PR to include the missing variants?
We only have to check that we don't include them for targets where a reset reason does not exist. If the underlying C type is the same for every target than its not a problem.

Hi @Vollbrecht , thanks for your support.
Before a PR, please let me se if I'm understanding what is going on. It seems that the IDF has a common esp_reset_reason_t for all the targets at https://github.com/espressif/esp-idf/blob/master/components/esp_system/include/esp_system.h#L24 :
typedef enum {
    ESP_RST_UNKNOWN,    //!< Reset reason can not be determined
    ESP_RST_POWERON,    //!< Reset due to power-on event
    ESP_RST_EXT,        //!< Reset by external pin (not applicable for ESP32)
    ESP_RST_SW,         //!< Software reset via esp_restart
    ESP_RST_PANIC,      //!< Software reset due to exception/panic
    ESP_RST_INT_WDT,    //!< Reset (software or hardware) due to interrupt watchdog
    ESP_RST_TASK_WDT,   //!< Reset due to task watchdog
    ESP_RST_WDT,        //!< Reset due to other watchdogs
    ESP_RST_DEEPSLEEP,  //!< Reset after exiting deep sleep mode
    ESP_RST_BROWNOUT,   //!< Brownout reset (software or hardware)
    ESP_RST_SDIO,       //!< Reset over SDIO
    ESP_RST_USB,        //!< Reset by USB peripheral
    ESP_RST_JTAG,       //!< Reset by JTAG
    ESP_RST_EFUSE,      //!< Reset due to efuse error
    ESP_RST_PWR_GLITCH, //!< Reset due to power glitch detected
    ESP_RST_CPU_LOCKUP, //!< Reset due to CPU lock up
} esp_reset_reason_t;

and the per target reasons (for example https://github.com/espressif/esp-idf/blob/v5.2.1/components/soc/esp32c2/include/soc/reset_reasons.h ) are boiled down to these at their respective get_reset_reason() like in https://github.com/espressif/esp-idf/blob/master/components/esp_system/port/soc/esp32c61/reset_reason.c#L19
If this is the case, we just need to add the last reasons to ResetReason and update the from method. That will work with all the targets as the c part is doing the per target part. Isn't it?

If i see it correctly they added most of the additions in ESP-IDF version v5.1 and onwards. They are here  but for example not in v5.0 here
So we would simply need a conditional for all new options for v5.1 and onwards.

The condition can look something like
    #[cfg(not(any(
        esp_idf_version_major = "4",
        all(esp_idf_version_major = "5", esp_idf_version_minor = "0"),
    )))] // ESP-IDF 5.1 and later

    ``

Ah, and in v5.2.2 they added ESP_RST_EFUSE, ESP_RST_PWR_GLITCH or ESP_RST_CPU_LOCKUP, that answers my PS question.
Let me prepare a PR...


Overlapping cells when clearing long notebook after scrolling

Environment data

VS Code version: 1.75.1
Jupyter Extension version (available under the Extensions sidebar): v2023.1.2010391206
Python Extension version (available under the Extensions sidebar): v2023.2.0
OS (Windows | Mac | Linux distro) and version: Windows 10
Python and/or Anaconda version: 3.10.8
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
Jupyter server running: Local

Actual behaviour
Bad rendering with overlapping cells after clear
Steps to reproduce:

Create new notebook
First cell:

import pandas as pd

Second cell:

#
#
#
#
#
#
#
#
pd.DataFrame(range(20))

Copy/paste second cell 6 times, so that it's longer than the screen
Run notebook
Scroll to notebook end
Select last cell
Scroll the notebook a bit up
Press Clear All Outputs button
You'll see something like in the screenshots below. It might take a few tries, it doesn't always happen. Try varying actions in steps 8-10.

Screenshot 1

Screenshot 2

Screenshot 3, with customized notebook settings (no cell status bar, ...)

Also, I think this issue, #194841, and #216950 are duplicates (not to mention several issues already closed as duplicate).

@flowrean  pleat can you share the notebook along with a screen recording. You can use gifcap.dev to record the screen


Prism should not error due to extra content-type header

Context
SPS Commerce has reached out to us with this ask:
"We are the process of rolling out Prism in proxy mode to validate our APIs specs in services, in logging mode to evaluate traffic.
That is working quite well, except one MAJOR issue related to the stoplight platform functionality for “Send API Requests”.
Specifically, with the Prism Proxy in place with a command such as:
prism proxy design/v4.oas.yml http://localhost:5000/
If I then make a curl request to the service (notice I’ve included content-type for this GET request):
curl --request GET \
 --url '[http://localhost:4010/examples`](http://localhost:4010/examples) --header 'Content-Type: application/json'

This will fail on the Prism side as follows:
{
    "type": "TypeError",
    "title": "Request with GET/HEAD method cannot have body",
    "status": 500,
    "detail": ""
}

Got this from SPS Commerce: "Our teams are well integrated with Stoplight for sending requests to our API, and so rolling out Prism in front of it has been halted for the time being until we can fix either the Prism side or the Stoplight side."

Corresponding upstream UI issue: https://github.com/stoplightio/elements/issues/2351

Between this noted issue and the issue in stoplight elements (https://github.com/stoplightio/elements/issues/2351), it makes it pretty much impossible to use Prism alongside elements in the same API. Glad to see a priority of high on this issue given the impact of how this can break Prism even in log mode.


docs(ComponentDoc): Fix clicking sidebar item doesn't make it active bug

Fix a bug within the documentation site where when a sidebar item is selected that is below the current selection or there is no current selection, the item above the selected will be active not the selected item.
Steps to reproduce issue:

Go here: http://react.semantic-ui.com/elements/button/
Expand the Types section on the sidebar on the right
Click Expand right below Button

Expected Behavior: Expand will be emphasized as active within the sidebar
Current Behavior: Button, above Expand is emphasized as active
This stems from the onTopPassed and onTopPassedReversed behavior on the Visibility component that wraps the example. These features work fine when the user is doing the scrolling, but not as well when the scrolling is being done programmatically, ie. scrollToAnchor().
My solution is simply to set a flag when the sidebar item is selected and scrollToAnchor() is called such that the onPassed events don't fire for a short time while the animation is occurring.

Codecov Report

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

@@           Coverage Diff           @@
##           master    #3223   +/-   ##
=======================================
  Coverage   99.92%   99.92%
=======================================
  Files         169      169
  Lines        2790     2790
=======================================
  Hits         2788     2788
  Misses          2        2

Continue to review full report at Codecov.

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

I have a feeling that this could be due to an off-by-one issue.  The scroll to anchor scrolls precisely to the element, but doesn't actually "pass" it.  I'm betting the scrollToAnchor logic for stopping scroll on arrival at the element and the Visibility logic for calling onTopPassed are 1px off from eachother.
Let's avoid use of timeouts as they introduce hidden implicit dependencies between scrollToAnchor.js and ComponentDoc.js.  If one of those were to change, scroll would be broken again.  Let's find a fix that doesn't introduce coupling.

@fcwheat That sounds very reasonable to me on the surface.  Do you want to give a shot and see if it works out?
You'd add the propType and typings, add a doc site example for each prop, and write a test for each prop.  You can copy the patterns that exist there for the other props as well.
It is worth noting that I'm not sure if this will fix the issue or not.  You could try the theory by playing the calculations in scrollToAnchor to make it scroll a few pixels passed the anchor and see if that resolves the problem.  If so, then we know it is an off by one error we need to address here.
In either case, the props you mention sound pretty useful.


merge 'wing pulsatile organ' and 'scutellar pulsatile organ'

There is only one organ (per side) that circulates hemolymph around the wing, making these terms equivalent.
The 1-5 subclasses of 'wing pulsatile organ' may have been confused with muscle cells - of which there are 7 per organ, but this is not clear (I do not have access to the original reference) and these terms have not been used in curation, so probably best to just obsolete them.
see FBrf0206946 and FBrf0205292

related to #597 as the 1-5 terms have no definition


Allows Stringy to work without ext-mbstring

Allows Stringy to work without ext-mbstring

It'd be nice to allow users the freedom to use either the extension or polyfill.

As-is, I don't think I'd merge, as I suspect the polyfill is quite a bit slower than the extension. I'd have to benchmark first. But it would be great to allow users to choose from one or the other.

It'd be nice to allow users the freedom to use either the extension or polyfill.

User DO have the freedom. The poylfill is a fallback for when the extension is not avialble. It does not replace it.

I realize that it's a fallback. My comment was in regards to it still being a forced dependency, rather than a suggested one. From a different perspective, I don't deliver shims/polyfills for IE9 to latest chrome - it's unnecessary.

As is forcing anyone with ext-mbstring to download this polyfill.

Yes, ture, but that's not that much of a hardship imo.

I think I'd be more open to it if I could figure out how to get travis building all versions of PHP with ext-mbstring enabled/disabled - doubling up on the number of jobs.

Sweet! Let's see how this runs :)

Seems we both are hanged on https://travis-ci.org/danielstjules/Stringy/builds/108171907 at the same time @danielstjules  ;-)

Looks good, thanks again! :)


[DDW-280] Create wallet screens stories

This PR creates new Storybook stories for the Wallet screens.
Todo:

[x] Empty screen
[x] Summary
[x] Send
[x] Receive
[x] Transactions
[x] Adapt empty screen to accommodate different screen categories (e.g. DDW-269)

Won't do

[ ] Settings
[ ] fs issue

Screenshots:

Review Checklist:
Basics

[ ] PR is updated to the most recent version of target branch (and there are no conflicts)
[ ] PR has good description that summarizes all changes and shows some screenshots or animated GIFs of important UI changes
[ ] CHANGELOG entry has been added and is linked to the correct PR on GitHub
[ ] Automated tests: All acceptance tests are passing (npm run test)
[ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (npm run dev)
[ ] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (npm run package / CI builds)
[ ] There are no flow errors or warnings (npm run flow:test)
[ ] There are no lint errors or warnings (npm run lint)
[ ] Text changes are proofread and approved (Jane Wild)
[ ] There are no missing translations (running npm run manage:translations produces no changes)
[ ] UI changes look good in all themes (Alexander Rukin)
[ ] Storybook works and no stories are broken (npm run storybook)
[ ] In case of npm dependency changes both package-lock.json and yarn.lock files are updated

Code Quality

[ ] Important parts of the code are properly documented and commented
[ ] Code is properly typed with flow
[ ] React components are split-up enough to avoid unnecessary re-rendering
[ ] Any code that only works in Electron is neatly separated from components

Testing

[ ] New feature / change is covered by acceptance tests
[ ] All existing acceptance tests are still up-to-date
[ ] New feature / change is covered by Daedalus Testing scenario
[ ] All existing Daedalus Testing scenarios are still up-to-date

After Review:

[ ] Merge PR
[ ] Delete source branch
[ ] Move ticket to done on the Youtrack board

Looking forward to this one. :) Please attach screenshots when ready.

@darko-mijic still facing a few issues, but the main part is done.

After speaking with @DominikGuzei we realized it's not possible to fix the Node issues, at the moment. Therefore the Settings screen story is commented out until we finish removing all the Node dependency.
For the Send screen dialogs (with and with no password) I found it easier to implement an Addon called Knobs, which adds great possibilities, that I tried to explore in other screens as well. To use it, make sure to open the Addon panel (⌘/⌃ + ⇧  + C).

After seeing [DDW-269] I realized it needs some adaptations, to accommodate other screens categories. It could be reviewed already, though.

Just realized that, after decoupling the files, the store is not propagating to all the children, thus the SendWallet dialog won't change to the the password version. I'll try to fix it over the weekend.

Back to WIP due to the issue above

Reviewing this now

@daniloprates im working on the settings screen now 😉

@nikolaglumac @daniloprates i added the wallet settings screen with knobs for the change password and wallet delete dialogs 😉

@nikolaglumac ready for final review!


App Update not working

Bug description:
Ferdi is unable to update itself.
When i press "Search for Updates", the button says "updates available, downloading..." for about ten seconds, then returns to its default state and nothing happens.
It makes no difference wether i have "include nightly versions" enabled or not.
The only way i can update is through downloading the official installer (which is very limiting because i am currently having this bug where Discord will only open all images in my brownser when i click on them)
Steps to reproduce:
"Click the "Search for Updates" button

Go to settings
Click on"Search for Updates" button
Wait a few seconds

Screenshots
https://user-images.githubusercontent.com/13683581/135747313-153daa3c-1b90-46a9-9167-e40021710e34.mp4
Environment:

Operating System: Windows 11 21H2 (22000.194)

Ferdi Version: 5.62

Server: Ferdi

Debug information:
Ferdi_Debug.txt

Closing - duplicate of #329


Installation error

after I migrated and ran the seeders.still this line was problemtaic
 return \App\Application\Model\Menu::where('name' , $name)->with(['item' => function($query){
    return $query->orderBy('order' , 'asc');
}])->first()->item->groupBy('parent_id');

"Trying to get property of non-object (View: /tmp/laraflat/app/Application/views/layouts/menu.blade.php) (View: /tmp/laraflat/app/Application/views/layouts/menu. ▶"
i installed it with composer create-project --prefer-dist laraflat/laraflat

pull form the dev this will be fix


feat: Add Swap Kit components className override.

What changed? Why?
Add className override to SwapButton, SwapMessage, SwapToggleButton, Swap, QuoteWarning , and SwapAmountInput.
Add missing React input types for the respective components.
Notes to reviewers
How has it been tested?
Tested locally, by adding a background color using the className field:

@cpcramer you made several coding changes in this PR, where are the tests to help cover those changes?


MC: Mobile - fees & liquidity

Figma link
Figma

[x] Update spacing/padding at top of the page and between the main divs to match figma HIGH
[x] Check that all text styles (size + color) on this page match figma HIGH
[x] Check that component styling and states match figma HIGH

[x] Text input component
[x] Note that the '%' should be inside the input

[x] Market visibility background should match figma HIGH
[x] Update tooltips to match figma

Comparison:

one high priority item:

[ ] The text beside the affiliate fee text input is cut off - can't read it

three low priority items:

[ ] h1 should be left aligned
[ ] h2's (e.g. market creator fee) text style doesn't match figma
[ ] paragraph copy color should be the text-secondary color


Icons all mixed up

Hi,
Someone installed fontello_rails_converter on the project I work in some time ago. The config.json was missing. I tried to import the svg I have into fontello.com. Everything seems alright except the icons are mixed up in the project. Seems each time I try to do it, the icons are mixed differently. Is there any hope to fix this? If so, how can it be done?

Hi @EddieOne thanks for your report.  Could you provide some additional information and the exact steps how to reproduce the behavior you are describing?

Hi, @jhilden, I took the the fontello.svg from my project, dragged it into fontello.com, downloaded the zip, placed it at myapp/tmp/fontello.zip, and run the command 'fontello convert --no-download'.

Did it persist a config.json?  Was that config.json used for subsequent fontello calls?

The project is old, like 10 years old. I searched the git history and it seems there was never a config.json. This was my attempt to create one from the svg font file.
It seems someone no longer working on the project, once install fontello_rails_converter and forgot to put the config.json in place.

hmm I tried this again and it seems to work now. I'm going to pretend I'm sure it was v0.4.2 that fixed it as I have no idea otherwise. Thanks


Chat

Coverage increased (+1.1%) to 64.186% when pulling cf31c820c9327b3ed0ce6891ccc2331d13097312 on cpacia:master into f6afeccdd3fcbdf236a87edd0e5612a8a0811e13 on OpenBazaar:master.

Coverage increased (+1.08%) to 64.151% when pulling dbc839759f4608668ca17a12aba34043ca8df260 on cpacia:master into f6afeccdd3fcbdf236a87edd0e5612a8a0811e13 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling ef6ee85199873ed24904126ec12d5d084960cc73 on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling dd4b05512331a8a57f51e361650ca687fb1745e3 on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling 96ee8122bab42d001588403b034986dcc13d7189 on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling e46888593cee3a003d0036fbaf3670c7dee47d13 on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Looks good. A few comments:

Should there be a ValidateChat function that checks things like message length?
I suggest adding a timestamp field to the Chat message protobuf (for when the sender sent the message). This will help ordering messages to the recipient, and the timestamp can be displayed to convey "freshness" of messages.
It is common for messaging apps to display a subtle notification when the recipient has received the message and/or when the recipient has read the message. Is that something we want?
As I understand, two peers can have several parallel "conversations". For example, there might be two separate moderated disputes on two different orders. Should there be a conversation field in the message protobuf, so that messages can to assigned to the right conversation?

Should there be a ValidateChat function that checks things like message length?

Maybe. Do other app, like facebook enforce a max length?
@drwasho @jjeffryes @rmisio

I suggest adding a timestamp field to the Chat message protobuf (for when the sender sent the message). This will help ordering messages to the recipient, and the timestamp can be displayed to convey "freshness" of messages.

Yeah now that I think of it, it might be necessary for offline messages. My worry though is that messages will come in with a timestamp that is before the last one you sent and the UI will stick it before that message, making it seem buggy. Maybe we'll just have to see how it works in practice.

It is common for messaging apps to display a subtle notification when the recipient has received the message and/or when the recipient has read the message. Is that something we want?

I like that feature, but it requires more messages to be sent. Right now there is an ack on both the online and offline messages that could be used to at least ack that the person received it.

As I understand, two peers can have several parallel "conversations". For example, there might be two separate moderated disputes on two different orders. Should there be a conversation field in the message protobuf, so that messages can to assigned to the right conversation?

I'm mostly using the subject field for that purpose. A subject of "" is a general chat message that gets routed to the general chat. Whereas an order ID in the subject line will go to the specific order.

Coverage increased (+1.1%) to 63.924% when pulling 6c45adc33e54d70c0496990dab7559f86e51d04d on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling a66e6348b853ece3c18421e85dca3e9164516f0e on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling 138ba4ac7d86d9dc22f8c0c591c094e62ed677ea on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling 81bd7b9415ddf1c2b587e38301d2ad192aaa6b52 on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling 9ced731d8d79e30bcc6c288c798195e286f2250b on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling f991b8eda8cee2d4f413ba1bfe506befce0dd0c9 on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling d6386abf8537c9cd2b1d6afa1499ae6908a252ed on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling 17e7a8cf71855a8377daf8cc90fddda39b1fd0ff on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling 9e05bd58810b1237433487f3cc5d4bfe46a9072d on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

@cpacia I'm not sure what the max length is in other apps (a quick search says either 20k or 55k for FB), but I'm pretty sure they all have one. If you don't, someone could send a message with a gigabyte of text or something else absurd.
I think 20k characters would be a good limit.

Coverage increased (+1.1%) to 63.924% when pulling b8938abd1382e2859ad47c439e927a3f6768e626 on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.

Coverage increased (+1.1%) to 63.924% when pulling 1c39e010456ec1bea6b23290072f1a8370f31ff1 on cpacia:master into 7e38d577db9957e00f7ad85769f17bb7c724c502 on OpenBazaar:master.


feat(v3): remove deprecated checks and calls

Description

Initial work of removing the deprecated things in v3

Closes

Think i might need help on the new openapi stuff, i wish i had the docs rendered :P

#3264 should give us the rendered docs

make it smaller :)


not working with rtl direction

I'm using the i18next library for the translation and react slick for Carasoul. it works fine for English and shows all the 5 slides of the slider but on the Arabic side it is not showing but if I give one slide only to the slider then it shows on the Arabic side as well but not more than one slide. Thanks

I encountered the same issue, try this package instead: https://github.com/ryangphan/react-slick-pnth . It is also react-slick, but with improved rtl support

I encountered the same issue, try this package instead: https://github.com/ryangphan/react-slick-pnth . It is also react-slick, but with improved rtl support

This doesn't work in case of vertical true.


FreeRDP + NoTouch OS + Raspberry Pi 4 Video issue

Hi everyone,
we are testing Raspi 4 to use as Thin Client, but we have this "lag" issue since then. Can be considered a bug?
NoTouch OS 3.1.254
FreeRDP c 1 5 7 0 6 7 c c f  (according NoTouch Release Notes)
This not happen on other Thin Clients (HP, VXL), only with Raspi 4.
As you can see on video, the problem is only inside the session.
https://youtu.be/iQ8PLOzDEyE

@edlarini the video looks a lot like you´re not using optimal connection settings for a windows 10.
But most issues we encountered so far are problems with the graphics driver and bandwidth limitation between CPU and GPU on raspberry.
Another way to check for possible issues is, if you could try with xfreerdp manually and check which options (e.g. /network:auto /rfx /gfx:avc444) improve the situation?

@akallabeth actually it´s Windows Server 2016, should I use these settings? Thanks.

@edlarini does not matter, it is more or less the same. yes, try them (maybe remove the avc444 if it is slow, so you can trade bandwidth for CPU)

ok tks, will give a try

I tried. It didn´t work as user parameter, but it works in display settings as a graphic driver, very fast, perfect!. However the OS starts in safe mode, which is bad. I contacted Stratodesk about the safe mode issue and had this answer:
"we can't use any alternative driver, that solution would then only work for freeRDP but would severely hurt the performance of the enterprise clients from Citrix and VMware, so the legacy driver is no option in our case."
:(

@edlarini so then you have the cause of the issue. can´t do much about stratodesk though.


[INFO] Infusion Enchantment recipes add and remove

I adding Infusion Enchantment recipes to the WIKI.
//Infusion Enchantment recipes
//ResearchKey, Enchantment ID, Instability, AspectsList, ArrayOfInputStacks,
mods.thaumcraft.Infusion.addEnchantment("XPBOOST", 45, 5, "victus 10, cognitio 8, vitreus 6",  [minecraft:experience_bottle, minecraft:experience_bottle,minecraft:experience_bottle,
Thaumcraft:ItemResource:14]);
//ResultStack
mods.thaumcraft.Infusion.removeEnchant(45);

So? why is this an issue?

Thanks for complaining every time.

What? This isn't am issue is it? If it is then please elaborate, but I am
homestly not sure why youade this bug report...
On Saturday, July 11, 2015, Martin<EMAIL_ADDRESS>wrote:

Thanks for complaining every time.
—
Reply to this email directly or view it on GitHub
https://github.com/jaredlll08/ModTweaker2/issues/178#issuecomment-120595731
.

If you are just notifying me that you did that, then thanks, but next time, just open an issue and close it, that way, I know it isn't a bug, and you are just notifying me
or I am always in IRC
#jaredlll08 on espernet

I assume this is because this handler is missing on the doc?

I add it already.

Thank you!!! :thumbsup:


[SPARK-31249][CORE]Fix flaky CoarseGrainedSchedulerBackendSuite.custom log url for Spark UI is applied

What changes were proposed in this pull request?

In CoarseGrainedSchedulerBackendSuite.RegisterExecutor, change it to post SparkListenerExecutorAdded before context.reply(true).
Why are the changes needed?

To fix flaky CoarseGrainedSchedulerBackendSuite.custom log url for Spark UI is applied.
In this test, though we use askSync to register executor but askSync could be finished before we posting the 3rd SparkListenerExecutorAdded event to the listener bus due to the reason that context.reply(true) comes before listenerBus.post.
The error can be reproduced if you:

loop it for 500 times in one turn
or, insert a Thread.sleep(1000) between post and reply.

Does this PR introduce any user-facing change?

No.
How was this patch tested?

Loop the flaky tests for 1000 times without any error.

ping @jiangxb1987 @HeartSaVioR @HyukjinKwon Please take a look, thanks!

Test build #120719 has started for PR 28100 at commit e32cc30.

Merged build finished. Test PASSed.

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

Test build #120719 has finished for PR 28100 at commit e32cc30.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/120719/
Test FAILed.

jenkins, retest this please.

Test build #120724 has started for PR 28100 at commit e32cc30.

Merged build finished. Test PASSed.

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

Test build #120724 has finished for PR 28100 at commit e32cc30.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

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

Merged to master and branch-3.0.

Thanks for looking into this @Ngone51.

thanks all!

Late LGTM. Thanks for looking into it!