English regular verbs are not properly populated.

Describe the bug
Thanks to @vectomon who ran the following command: mlconjug -l en help and it gave this result:
{'imperative': {'imperative present': OrderedDict([('2s :', ''),
('1p :', ''),
('2p :', '')])},
'indicative': {'indicative past tense': OrderedDict([('1s', 'ed'),
('2s', 'ed'),
('3s', 'ed'),
('1p', 'ed'),
('2p', 'ed'),
('3p', 'ed')]),
'indicative present': OrderedDict([('1s', ''),
('2s', ''),
('3s', 's'),
('1p', ''),
('2p', ''),
('3p', '')]),
'indicative present continuous': OrderedDict([('1s 1s', 'ing'),
('2s 2s', 'ing'),
('3s 3s', 'ing'),
('1p 1p', 'ing'),
('2p 2p', 'ing'),
('3p 3p',
'ing')]),
'indicative present perfect': OrderedDict([('1s', 'ed'),
('2s', 'ed'),
('3s', 'ed'),
('1p', 'ed'),
('2p', 'ed'),
('3p', 'ed')])},
'infinitive': {'infinitive present': OrderedDict([('', '')])}}
Expected behavior
the conjug_info should include the verb roots qnd not only the verb endings.
Additional context
I will shortly release a new version of mlconjug during the week that fixes this issue.

Fixed by PR #76


ENHANCEMENT Update bootstrap alert

Changes were made to indicate that locale not visible until it is published, as well as the translations updated via the TextCollector task:

An 'invisible eye' icon still needs to be added at some stage.
Related to #311
Reference: https://projects.invisionapp.com/share/ZBFVZJCKU38#/screens/279729292_X_Fluent

I amended one of the unit tests, as the logic has changed.

Hi team,
Why was the LOCALESTATUSDRAFT removed? If an object has implemented $frontend_publish_required = false, then that message is a legitimate possibility where the frontend content is being inherited from another Locale, but the CMS content has been drafted in the current Locale.

Hey @chrispenny - we made a UX decision to remove any additional SiteTree flags. In the situation you're describing I think it'd probably better to indicate this via some alert messages in the CMS edit form - what do you think?

Yea, that's all good - this is the message that gets displayed at the Top of the CMS fields though (separate to the flags).

Ah I see. In that case it was probably unintentional

No worries. If nobody beats me to it then I'll add it back in the next time I'm working in that space (not 100% sure when that will be though).


Cannot decrypt response header for scuttlebutt RPC request

Hi - thanks for working on these Java libraries for using the scuttlebutt protocol!
I have encountered a bug while attempting to use the scuttlebutt-handshake library to

Connect to a scuttlebot instance and do the secret handshake, using the same public and private key that the scuttlebot server is running with.
Send an RPC command to the server and receive a response. I chose the simplest command I know of, which is whoami which simply reports back the server's public key. I also tried createFeedStream by copying and pasting the body from the protocol docs and using a key for someone the scuttlebot instance is following.

Expected behaviour

My ClientHandler implementation's receivedMessage should be called back with the response bytes from the RPC request.

Actual behaviour

The secret handshake appears to happen.

Any encrypted RPC response is given - however, the SecureScuttlebuttStream class fails to decrypt the header ( null is returned at this line, then a NullPointerException is thrown): https://github.com/ConsenSys/cava/blob/14b34e7a89baf95c7873976256392dfdc9e666f8/scuttlebutt-handshake/src/main/java/net/consensys/cava/scuttlebutt/handshake/SecureScuttlebuttStream.java#L86

The Vertx library code swallows the NullPointerException because it is not configured with an exception handler, so it is not visible.

The receivedMessage ClientHandler implementation is not called back.

Steps I used to reproduce:

Check out commit c01f2e5745d8f2a1296027f9bda98ad9ac2aed3d of cava (which was the latest for me at the time - i didn't seem to be able to get the latest from the Maven repos.)

Run gradle build to create jar files for the libraries.

Init a gradle project and copy the libs into a 'lib' directory and add the libs directory as a dependency

Define a main class:

*
 * This Java source file was generated by the Gradle 'init' task.
 */
package cava.test;

import io.vertx.core.Vertx;
import net.consensys.cava.bytes.Bytes;
import net.consensys.cava.bytes.Bytes32;
import net.consensys.cava.concurrent.AsyncCompletion;
import net.consensys.cava.scuttlebutt.handshake.vertx.SecureScuttlebuttVertxClient;

import net.consensys.cava.crypto.sodium.Signature;
import net.consensys.cava.scuttlebutt.rpc.RPCCodec;
import net.consensys.cava.scuttlebutt.rpc.RPCFlag;

import java.util.Base64;

public class App {

    public static void main(String[] args) throws Exception {

        int port = 8008;

        String host = "localhost";

        String publicKeyBase64 = System.getenv("scuttle_public_key");
        String privateKeyBase64 = System.getenv("scuttle_private_key");

        if (publicKeyBase64 == null) {
            throw new Exception("scuttle_public_key environment variable missing");
        }

        if (privateKeyBase64 == null) {
            throw new Exception("scuttle_private_key environment variable missing");
        }

        byte[] publicKeyBytes = Base64.getDecoder().decode(publicKeyBase64);
        byte[] privateKeyBytes = Base64.getDecoder().decode(privateKeyBase64);

        Signature.PublicKey publicKey = Signature.PublicKey.fromBytes(publicKeyBytes);
        Signature.SecretKey privateKey = Signature.SecretKey.fromBytes(privateKeyBytes);

        Signature.KeyPair keyPair = new Signature.KeyPair(publicKey, privateKey);

        Vertx vertx = Vertx.vertx();

        // The default scuttlebutt network key (the one Patchwork uses.)
        String networkKeyBase64 = "1KHLiKZvAvjbY1ziZEHMXawbCEIM6qwjCDm3VYRan/s=";
        byte[] networkKeyBytes = Base64.getDecoder().decode(networkKeyBase64);

        Bytes32 networkKeyBytes32 = Bytes32.wrap(networkKeyBytes);

        SecureScuttlebuttVertxClient secureScuttlebuttVertxClient =
                new SecureScuttlebuttVertxClient(vertx, keyPair, networkKeyBytes32);

        AsyncCompletion onConnect = secureScuttlebuttVertxClient.connectTo(port, host, publicKey, (senderFn, stopFn) -> {

            // Tell the client handler how to send bytes to the server
            MyClientHandler clientHandler = new MyClientHandler(senderFn, stopFn);

            // An RPC command that just tells us our public key (like ssb-server whoami on the command line.)
            String rpcRequestBody = "{\n" +
                    "  \"name\": [\"whoami\"],\n" +
                    "  \"type\": \"async\" " +
                    "}";
            Bytes rpcRequest = RPCCodec.encodeRequest(rpcRequestBody, RPCFlag.BodyType.JSON);

            System.out.println("Attempting RPC request...");
            clientHandler.sendMessage(rpcRequest);

            // We hand over a ClientHandler so we get called back when new bytes arrive
            return clientHandler;
        });

    }
}

Define a ClientHandler implementation

package cava.test;

import net.consensys.cava.bytes.Bytes;
import net.consensys.cava.scuttlebutt.handshake.vertx.ClientHandler;

import java.util.function.Consumer;

public class MyClientHandler implements ClientHandler {

    private final Consumer<Bytes> sender;
    private final Runnable terminationFn;

    public MyClientHandler(Consumer<Bytes> sender, Runnable terminationFn) {
        this.sender = sender;
        this.terminationFn = terminationFn;
    }

    @Override
    public void receivedMessage(Bytes message) {

        System.out.println("We received a message?");

    }

    @Override
    public void streamClosed() {

        System.out.println("Stream closed?");

    }

    void sendMessage(Bytes bytes) {
        System.out.println("Sending message?");
        sender.accept(bytes);
    }

    void closeStream() {
        terminationFn.run();
    }
}

Set the public and private keys as the scuttle_public_key and scuttle_private_key environment variables by copying the base64 representations from the secret file in the .ssb directory (minus the .ed25519 suffix.)

Notice it doesn't get called back with bytes for the response, and step through debug to see it throwing a NullPointerException while trying to decrypt the header from the RPC response

I'm trying to debug the issue at the moment (i wonder if there's something strange going on with the keys), but I wondered if you had any ideas?

The latest build of master is here: https://bintray.com/consensys/consensys/cava/1.0.0-C01FE1-snapshot.
You can use this build by relying on jcenter.

I have an integration test running here: https://github.com/ConsenSys/cava/blob/master/scuttlebutt-handshake/src/test/java/net/consensys/cava/scuttlebutt/handshake/vertx/VertxIntegrationTest.java
Is your test much different from this approach? I'll try to reproduce using a unit test.

Thanks for your thoughts :)
.join()
Thanks - I added .join() - i actually had it previously as I was following the style of your unit tests, but then I forgot to add it back in after I made some changes :)
Stack trace
Here is a stack trace. However, this isn't actually printed to the console - I got this by running printStackTrace on the exception object in the step through debugger in intellij.
I still haven't worked out how to get vertx to not swallow the error.
java.lang.NullPointerException
	at net.consensys.cava.scuttlebutt.handshake.SecureScuttlebuttStream.decryptMessage(SecureScuttlebuttStream.java:87)
	at net.consensys.cava.scuttlebutt.handshake.SecureScuttlebuttStream.decrypt(SecureScuttlebuttStream.java:75)
	at net.consensys.cava.scuttlebutt.handshake.SecureScuttlebuttStream.readFromServer(SecureScuttlebuttStream.java:53)
	at net.consensys.cava.scuttlebutt.handshake.vertx.SecureScuttlebuttVertxClient$NetSocketClientHandler.handle(SecureScuttlebuttVertxClient.java:77)
	at io.vertx.core.net.impl.NetSocketImpl$DataMessageHandler.handle(NetSocketImpl.java:392)
	at io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:225)
	at io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:123)
	at io.vertx.core.net.impl.NetSocketImpl.handleMessage(NetSocketImpl.java:370)
	at io.vertx.core.net.impl.ConnectionBase.handleRead(ConnectionBase.java:397)
	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:320)
	at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43)
	at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:188)
	at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:174)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)

I tried calling the exceptionHandler method on the NetSocket object in the connectTo method, but that didn't work. Here's a screen shot where the error gets swallowed due to the exception handler being null in the InboundBuffer class in Vertx.

Published jar
Thanks!
What is the naming convention for the latest SNAPSHOT? I'd looked at all the versions here ( https://consensys.bintray.com/consensys/net/consensys/cava/cava-scuttlebutt-handshake/ ) and assumed that the one beginning with 'F' was the latest because it's the last one on the list and the highest letter at the start.
Integration test
I actually followed the example of that very test to learn to use the library, so my code shouldn't be that much different. The only difference is that I don't create an AtomicReference for the handler as I don't need to use it outside the connectTo callback for now.
For what it's worth, I spent a while comparing your code to the protocol guide today (the handshake and shared secret key and nonce generation for decrypting the headers and body), and I couldn't see any differences - looks perfect to me. I'm really confused!
I hope this is reproducible with a unit test! You could try copying my classes for the above and running against a local scuttlebot if that helps?

Yes, that's what I am doing now. I assumed you were connecting to the local Patchwork running on your machine.
So far I don't see the exception being thrown, digging in more now.

@atoulme - yeah, that's what I was doing (running it against patchbay which is an alternative client to patchwork) on my local machine :)

So far I don't see the exception being thrown, digging in more now.

it doesn't get printed to the console as Vertx is (strangely) swallowing it, if that's what you mean? Or do you mean you don't see it being thrown when step through debugging to line 87 on SecureScuttlebuttStream.java?

Not thrown - but I suspect I need to tune a bit better the keys used for the exchange.

On Mar 20, 2019, at 3:41 PM, Gordon Martin<EMAIL_ADDRESS>wrote:
@atoulme https://github.com/atoulme - yeah, that's what I was doing (running it against patchbay which is an alternative client to patchwork) on my local machine :)
So far I don't see the exception being thrown, digging in more now.
it doesn't get printed to the console as Vertx is (strangely) swallowing it, if that's what you mean? Or do you mean you don't see it being thrown when step through debugging to line 87 on SecureScuttlebuttStream.java?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/ConsenSys/cava/issues/192#issuecomment-475057017, or mute the thread https://github.com/notifications/unsubscribe-auth/AABBdhlzOy5TrYBlrkDAHfIYwNT_DTKoks5vYrkVgaJpZM4b_aqM.

OK, I have created a unit test that attempts to connect to a host on localhost at port 8008. You need to provide the public key (see the TODO).
It's checked in in this branch.
https://github.com/atoulme/cava/tree/integration_testing_ssb
With this unit test, handshake proceeds and the client sends correctly a message to the remote host. The host doesn't respond however. Do you know how to get patchwork or patchbay to log a detailed log of requests they are receiving?

Thanks a lot, @atoulme . I'll try this out tomorrow and look into getting patchwork to print RPC activity :)

@atoulme - I tried the test and I got the same issue. I also got handshake failures on some of the runs, so I thought it might make sense to only complete the future if the handshake succeeds - I made a PR against your integration_testing_ssb branch here ( https://github.com/atoulme/cava/pull/1.) That way the consuming code knows it's safe to make RPC requests because the connection is complete and the handshake has finished.
I made a gif of the exception happening and uploaded it here: https://imgur.com/a/OiXbLvc
Note: the error is actually swallowed by Vertx and not printed by the logger through the following code path:

The decrypted header fails, so the decryptedHeader variable is none here https://github.com/atoulme/cava/blob/integration_testing_ssb/scuttlebutt-handshake/src/main/java/net/consensys/cava/scuttlebutt/handshake/SecureScuttlebuttStream.java#L87
https://github.com/atoulme/cava/blob/6650dc9b3d46a0e860fb5208bb366cdf58124f3b/scuttlebutt-handshake/src/main/java/net/consensys/cava/scuttlebutt/handshake/vertx/SecureScuttlebuttVertxClient.java#L98 catches the null pointer exception
.getMessage called by the above on a NullPointerException returns null, and SimpleLogger calls requireNonNull(message) on the supplied message (which is null.) So it also throws a null pointer exception!
Vertx (annoyingly) thinks it doesn't have an exceptionHandler configured, so just called return without doing anything with the message (as you can see in the gif above.) I don't know why the  socket.exceptionHandler(e -> logger.error(e.getMessage(), e)); line we both tried adding doesn't mean this isn't 'null'.

I wonder if the same happens for you if you step through debug?

I just updated the https://github.com/atoulme/cava/pull/1 pull request to throw a more meaningful error than 'null pointer exception' if we failed to decrypt the header. This stops the error being swallowed before it's printed out.

I will test with patchbay today. Did you find a way to get debug output from patchbay?

@atoulme - it doesn't look like there's a way to do it at the moment, but I'll add some modifications to the secret-stack library's core.js file to print RPC request and responses. I'll let you know when I've done that.

@atoulme
I added the custom RPC logging to a patchbay branch ( https://github.com/ssbc/patchbay/tree/print-rpc ) for the incoming and outgoing socket streams .
It seems like an error is being thrown here in mux-rpc https://github.com/ssbc/muxrpc/blob/v6/stream.js#L39 . I'll see if I can add logging at this level too - maybe something is malformed about our RPC request and it's causing the RPC response to be malformed (not have encrypted headers or something...) I'll investigate.
Note: to make sure it wasn't just because args is missing in our test, I copied and pasted the RPC request that's printed when I ran sbot whoami on the command line to send the same command, and ran the test again (with the same effect.)
    String rpcRequestBody = "{\"name\":[\"whoami\"],\"args\":[]}";

Assuming you have npm and node installed, you can run it with my custom logging by doing:
git clone https://github.com/ssbc/patchbay
git checkout print-rpc
npm install
npm start

Here's the log for when I ran the test (where source is incoming socket data and sink is outgoing socket data.)
[source] {"name":["gossip","peers"],"args":[]}
[sink] ����
[sink] []
[sink]
:
[sink] {"name":["blobs","createWants"],"args":[],"type":"source"}
[source] �:
{
"name": ["whoami"],
"type": "async",
"args": []
}
[sink] �����
[sink] {"message":"invalid request, args should be array, was:{"type":"Buffer","data":[10,123,10,32,32,34,110,97,109,101,34,58,32,91,34,119,104,111,97,109,105,34,93,44,10,32,32,34,116,121,112,101,34,58,32,34,97,115,121,110,99,34,44,10,32,32,34,97,114,103,115,34,58,32,91,93,10,125]}","name":"Error","stack":"Error: invalid request, args should be array, was:{"type":"Buffer","data":[10,123,10,32,32,34,110,97,109,101,34,58,32,91,34,119,104,111,97,109,105,34,93,44,10,32,32,34,116,121,112,101,34,58,32,34,97,115,121,110,99,34,44,10,32,32,34,97,114,103,115,34,58,32,91,93,10,125]}\n    at Object.request (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/muxrpc/stream.js:39:19)\n    at PacketStream._onrequest (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/packet-stream/index.js:161:17)\n    at PacketStream.write (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/packet-stream/index.js:134:41)\n    at /home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/muxrpc/pull-weird.js:56:15\n    at /home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/pull-stream/sinks/drain.js:24:37\n    at /home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11\n    at Object.cb (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/packet-stream-codec/index.js:111:11)\n    at drain (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/pull-reader/index.js:39:14)\n    at more (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/pull-reader/index.js:55:13)\n    at Function.reader.read (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/pull-reader/index.js:99:7)"}

Great. On my end I ran Patchwork directly from CLI, and it's outputting some logging to stdout.
    at Object.request (/Applications/Patchwork.app/Contents/Resources/app.asar/node_modules/muxrpc/stream.js:41:12)
    at PacketStream._onrequest (/Applications/Patchwork.app/Contents/Resources/app.asar/node_modules/packet-stream/index.js:161:17)
    at PacketStream.write (/Applications/Patchwork.app/Contents/Resources/app.asar/node_modules/packet-stream/index.js:134:41)
    at /Applications/Patchwork.app/Contents/Resources/app.asar/node_modules/muxrpc/pull-weird.js:56:15
    at /Applications/Patchwork.app/Contents/Resources/app.asar/node_modules/pull-stream/sinks/drain.js:24:37
    at /Applications/Patchwork.app/Contents/Resources/app.asar/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11
    at Object.cb (/Applications/Patchwork.app/Contents/Resources/app.asar/node_modules/packet-stream-codec/index.js:111:11)
    at drain (/Applications/Patchwork.app/Contents/Resources/app.asar/node_modules/pull-reader/index.js:39:14)
    at more (/Applications/Patchwork.app/Contents/Resources/app.asar/node_modules/pull-reader/index.js:51:13)
    at Function.reader.read (/Applications/Patchwork.app/Contents/Resources/app.asar/node_modules/pull-reader/index.js:95:7)```

I suspect we're seeing the same issue.

I tried to add "args:[]" to the RPC payload as it sounds like that was the issue.
But I didn't get a different error.
I'm switching gears. I tried running with ssb-server and getting proper connection and disconnection, but no error being logged:
info @0r9 SBOT @WZQEaekgF2I0AeGTqdamAeKtW8P6PTxKumiqQF7X7zM=.ed25519 Connected
info @0r9 SBOT @WZQEaekgF2I0AeGTqdamAeKtW8P6PTxKumiqQF7X7zM=.ed25519 Disconnected
info @0r9 SBOT @vUbEJ8HiAt4QT9iecz+nM+fv64cqmJWfULH18XlRKhY=.ed25519 Connected
info @0r9 SBOT @vUbEJ8HiAt4QT9iecz+nM+fv64cqmJWfULH18XlRKhY=.ed25519 Disconnected
info @0r9 SBOT @EnUFXgO/eQqZOT0tYhb6lakPOHiSnlV5LcGCOMVvQWg=.ed25519 Connected
info @0r9 SBOT @EnUFXgO/eQqZOT0tYhb6lakPOHiSnlV5LcGCOMVvQWg=.ed25519 Disconnected

I'll try your build now.

@atoulme: as a related aside, what do you think about converting all this to coroutines (with an AsyncResult/Completion wrapper for the Luddites)? At least then we can encourage people to use the Kotlin API which will prevent any missing calls to .join(), etc.

Well, that's quite unrelated to the issue at hand here.
There is a couple things that need to be straightened out in the vert.x client and server impls so they really do a better job with multiple connections. We should also build a kotlin version of those constructs for easier consumption, yes.
The rest of the code is quite procedural and can stay in Java.
Now back to debugging this thing.

As another data point, the byte buffer printed out in the error above contains the payload itself when converted to UTF-8
I wonder if the codec is encoding it as a string rather than JSON in the headers or something? (just clutching at straws)
> var a = new Buffer([123,34,110,97,109,101,34,58,91,34,119,104,111,97,109,105,34,93,44,34,97,114,103,115,34,58,91,93,125])
undefined
> a.toString()
'{"name":["whoami"],"args":[]}'
>

Another note:
I don't think the error decrypting the header issue is related to the malformed RPC requests error. The failure to decrypt header error happens even when the clientHandler.sendMessage(rpcRequest); line is commented out in the unit tests.
I guess it's possible that patchbay / patchwork is sending an RPC request to the Java process or there are some unexpected bytes or something.
I see some of these in the console, so I think it might be sending it to the Java process:
[sink] {"name":["blobs","createWants"],"args":[],"type":"source"}

Yes, we're having an issue with how the type of the RPC message is encoded.
It looks like https://github.com/ssbc/packet-stream-codec/blob/master/index.js does not interpret the byte correctly - the type is therefore set to 0, and the RPC method body is a buffer, which is a problem when you try to read its contents, as a JSON object is expected.
I am missing something in the way RPC flags are encoded - looking at it now.

Comment based on https://github.com/ConsenSys/cava/issues/192#issuecomment-475053532, but yes, otherwise offtopic :)

OK this is fixed - I got RPC flags inverted, sorry about that!
Here is the PR with a fix: https://github.com/ConsenSys/cava/pull/194/files
Please take a look. That might maybe solve the other issue you see with the incoming RPC message.
FWIW when I run whoami something about allowed functions.

Yeah, that's actually to be expected. You can only run whoami if you're using your own key (much like you could only publish a message if you're using your own key)
{"message":"method:whoami is not in list of allowed methods","name":"Error","stack":"Error: method:whoami is not in list of allowed methods\n    at Function.perms.pre (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/muxrpc/permissions.js:88:14)\n    at Object.<anonymous> (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/muxrpc/local-api.js:35:21)\n    at Object.request (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/muxrpc/stream.js:48:17)\n    at PacketStream._onrequest (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/packet-stream/index.js:161:17)\n    at PacketStream.write (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/packet-stream/index.js:134:41)\n    at /home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/muxrpc/pull-weird.js:56:15\n    at /home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/pull-stream/sinks/drain.js:24:37\n    at /home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11\n    at Object.cb (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/packet-stream-codec/index.js:111:11)\n    at drain (/home/happy0/projects/patchbay/node_modules/ssb-server/node_modules/pull-reader/index.js:39:14)"}

When I use the same keys as the ones in my ~/.ssb directory, patchbay attempts to send the right response over the socket:
[source] /{"name": ["whoami"],"type": "source","args":[]}
[sink] >����
[sink]<EMAIL_ADDRESS>
However, I'm still getting the NullPointerException when the library tries to decrypt the headers.
So the We received a message? message is now printed for you in the test? I wonder if there's something wrong with my libsodium library versions compared to you or something :S
Your pull request looks good to me =]. I think it'd be better if the future was completed with the exception if something goes wrong in the secret handshake: https://github.com/ConsenSys/cava/pull/195

No, it didn't print, since patchbay would throw an error about the allowed methods. I can look at going past that error and see if I reproduce your problem.
I have changed the code so it waits until handshake completion to return already, so the changes in your PR might not work.

@atoulme - if it helps, I've made a PR that updates the test to read your secret file in ~/.ssb/secret so that it's connecting with the same keys as the server (which means you're authenticated for any RPC request.)
PR here: https://github.com/ConsenSys/cava/pull/196/ :)

That's great! I will try to make the build pass on it and merge it. I have a few things in the way today, I will get to it early this afternoon my time.

With your patch I do see an exception. Great! Now I can concentrate on fixing the issue. Thank you for your help on those issues.

PR is here: #199
Thank you Gordon for helping out along the way. With this PR I receive messages from patchbay!
Please let me know if you see other problems.

Fantastic! Thanks @atoulme =]. Works for me too - very exciting. I was comparing the nonce stuff in the protocol specs to the code and that totally passed me by - I'm glad you spotted it.
I'm going to add some abstractions to these libraries to multiplex the RPC requests into Consumer<RPCMessage> for source type RPC requests and Future<RPCMessage> for async type RPC requests. Then perhaps add another layer on top of that which marshalls the JSON in the body of these RPCMessages into a specified Java class.
Is this something you'd be interested in having in Cava, or should it be a separate library which leverages Cava's scuttlebutt libraries?

It actually fails some of the time. I wonder if there's some subtle edge case with the buffering. I'll look into it :).
I added some code to the runWithPatchWork to perform the RPC request multiple times:
((MyClientHandler) clientHandler).sendMessage(RPCCodec.encodeRequest(rpcRequestBody, RPCFlag.BodyType.JSON));
    ((MyClientHandler) clientHandler).sendMessage(RPCCodec.encodeRequest(rpcRequestBody, RPCFlag.BodyType.JSON));
    ((MyClientHandler) clientHandler).sendMessage(RPCCodec.encodeRequest(rpcRequestBody, RPCFlag.BodyType.JSON));
    ((MyClientHandler) clientHandler).sendMessage(RPCCodec.encodeRequest(rpcRequestBody, RPCFlag.BodyType.JSON));

    ((MyClientHandler) clientHandler).sendMessage(RPCCodec.encodeRequest(rpcRequestBody, RPCFlag.BodyType.JSON));
    ((MyClientHandler) clientHandler).sendMessage(RPCCodec.encodeRequest(rpcRequestBody, RPCFlag.BodyType.JSON));
    ((MyClientHandler) clientHandler).sendMessage(RPCCodec.encodeRequest(rpcRequestBody, RPCFlag.BodyType.JSON));
    ((MyClientHandler) clientHandler).sendMessage(RPCCodec.encodeRequest(rpcRequestBody, RPCFlag.BodyType.JSON));

Sometimes it fails to decode one of the calls:
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:/home/happy0/intellij/lib/idea_rt.jar=34465:/home/happy0/intellij/bin -Dfile.encoding=UTF-8 -classpath /home/happy0/intellij/lib/idea_rt.jar:/home/happy0/intellij/plugins/junit/lib/junit-rt.jar:/home/happy0/intellij/plugins/junit/lib/junit5-rt.jar:/home/happy0/.m2/repository/org/junit/platform/junit-platform-launcher/1.3.2/junit-platform-launcher-1.3.2.jar:/home/happy0/.m2/repository/org/apiguardian/apiguardian-api/1.0.0/apiguardian-api-1.0.0.jar:/home/happy0/.m2/repository/org/junit/platform/junit-platform-engine/1.3.2/junit-platform-engine-1.3.2.jar:/home/happy0/.m2/repository/org/junit/platform/junit-platform-commons/1.3.2/junit-platform-commons-1.3.2.jar:/home/happy0/.m2/repository/org/opentest4j/opentest4j/1.1.1/opentest4j-1.1.1.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/icedtea-sound.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/home/happy0/projects/cava/scuttlebutt-rpc/out/test/classes:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_annotation/2.3.2/7c554c59dd2ea8c4e9e36b3308f8bf92db83e70c/error_prone_annotation-2.3.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.googlecode.java-diff-utils/diffutils/1.3.0/7e060dd5b19431e6d198e91ff670644372f60fbd/diffutils-1.3.0.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.auto/auto-common/0.10/c8f153ebe04a17183480ab4016098055fb474364/auto-common-0.10.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.checkerframework/javacutil/2.5.3/c545ca6fc7a57e3bc65d46e8e9438376f0db35ea/javacutil-2.5.3.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.pcollections/pcollections/2.1.2/15925fd6c32a29fe3f40a048d238c5ca58cb8362/pcollections-2.1.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_check_api/2.3.2/7415438c00adec8ba707689ec4168c8484d8403b/error_prone_check_api-2.3.2.jar:/home/happy0/projects/cava/scuttlebutt-rpc/out/production/classes:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_core/2.3.2/d5d121a23bcd48df2fe42dc3f1424cd05872993/error_prone_core-2.3.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.protobuf/protobuf-java/3.4.0/b32aba0cbe737a4ca953f71688725972e3ee927c/protobuf-java-3.4.0.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.checkerframework/dataflow/2.5.3/edf284e0838290d661b22483ecf648065e7ec440/dataflow-2.5.3.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.github.stephenc.jcip/jcip-annotations/1.0-1/ef31541dd28ae2cefdd17c7ebf352d93e9058c63/jcip-annotations-1.0-1.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_annotations/2.3.2/d1a0c5032570e0f64be6b4d9c90cdeb103129029/error_prone_annotations-2.3.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_type_annotations/2.3.2/e79e88b9051888c8ea806f49c86fa7e3e3728180/error_prone_type_annotations-2.3.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.checkerframework/checker-qual/2.5.3/4fe154d21bd734fe8c94ada37cdc41a9a6d61776/checker-qual-2.5.3.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jFormatString/3.0.0/d3995f9be450813bc2ccee8f0774c1a3033a0f30/jFormatString-3.0.0.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.github.kevinstern/software-and-algorithms/1.0/5e77666b72c6c5dd583c36148d17fc47f944dfb5/software-and-algorithms-1.0.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.vertx/vertx-core/3.6.2/988227077d06afc711b471680bd8af045a8aa784/vertx-core-3.6.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.9.5/3490508379d065fe3fcb80042b62f630f7588606/jackson-databind-2.9.5.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-engine/5.3.2/69350316a14c46d8f6c4c909e469ec9edf58c4f8/junit-jupiter-engine-5.3.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.60/bd47ad3bd14b8e82595c7adaa143501e60842a84/bcprov-jdk15on-1.60.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-params/5.3.2/606c97428ba94d06022cef6d0ae44e1eaff8ca3d/junit-jupiter-params-5.3.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-api/5.3.2/3602b523ffae9dabc04c329d73ab39ab04b3cbe2/junit-jupiter-api-5.3.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.logl/logl-logl/0.3.1/ec13fbeadbf5e922f2a97a953433136be782ce9/logl-logl-0.3.1.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.logl/logl-vertx/0.3.1/47adf3a279954ef10492a265056915cc75d5682/logl-vertx-0.3.1.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/27.0.1-jre/bd41a290787b5301e63929676d792c507bbc00ae/guava-27.0.1-jre.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.github.jnr/jnr-ffi/2.1.9/c465565992e8264012023c8b240e8175e235aa4e/jnr-ffi-2.1.9.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-engine/1.3.2/c54bc1d4654bd1ef15fccf512ce664184085969/junit-platform-engine-1.3.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.9.0/7c10d545325e3a6e72e06381afe469fd40eb701/jackson-annotations-2.9.0.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.9.7/4b7f0e0dc527fab032e9800ed231080fdc3ac015/jackson-core-2.9.7.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.logl/logl-api/0.3.1/4eee3a50fba1a4b8bbed52e769d429830e48b4e6/logl-api-0.3.1.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-commons/1.3.2/378d1d1b162426ad031522f6d51e3bf28d1631a4/junit-platform-commons-1.3.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.apiguardian/apiguardian-api/1.0.0/3ef5276905e36f4d8055fe3cb0bdcc7503ffc85d/apiguardian-api-1.0.0.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.opentest4j/opentest4j/1.1.1/efd9f971e91074491ea55b19f67b13470cf4fcdd/opentest4j-1.1.1.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-codec-http2/4.1.30.Final/2da92f518409904954d3e8dcc42eb6a562a70302/netty-codec-http2-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-handler/4.1.30.Final/ecc076332ed103411347f4806a44ee32d9d9cb5f/netty-handler-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-handler-proxy/4.1.30.Final/1baa1568fa936caddca0fae96fdf127fd5cbad16/netty-handler-proxy-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-resolver-dns/4.1.30.Final/3f4bcf2e9fff1361ac9ad0bd27a10a1b31399294/netty-resolver-dns-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-codec-http/4.1.30.Final/1384c630e8a0eeef33ad12a28791dce6e1d8767c/netty-codec-http-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-codec-socks/4.1.30.Final/ea272e3bb281d3a91d27278f47e61b4de285cc27/netty-codec-socks-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-codec-dns/4.1.30.Final/7d28ce324f6cd5ae4ddd7f3e5027e2a7f126740b/netty-codec-dns-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-codec/4.1.30.Final/515c8f609aaca28a94f984d89a9667dd3359c1b1/netty-codec-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport/4.1.30.Final/3d27bb432a3b125167ac161b26415ad29ec17f02/netty-transport-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-buffer/4.1.30.Final/597adb653306470fb3ec1af3c0f3f30a37b1310a/netty-buffer-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-resolver/4.1.30.Final/5106fd687066ffd712e5295d32af4e2ac6482613/netty-resolver-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/io.netty/netty-common/4.1.30.Final/5dca0c34d8f38af51a2398614e81888f51cf811a/netty-common-4.1.30.Final.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.guava/failureaccess/1.0.1/1dcf1de382a0bf95a3d8b0849546c88bac1292c9/failureaccess-1.0.1.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/b421526c5f297295adef1c886e5246c39d4ac629/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/3.0.2/25ea2e8b0c338a877313bd4672d3fe056ea78f0d/jsr305-3.0.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.checkerframework/checker-qual/2.5.2/cea74543d5904a30861a61b4643a5f2bb372efc4/checker-qual-2.5.2.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.errorprone/error_prone_annotations/2.2.0/88e3c593e9b3586e1c6177f89267da6fc6986f0c/error_prone_annotations-2.2.0.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.github.jnr/jffi/1.2.17/19335d57d54d54680bdf5aa2fe92cd41f5cd29ee/jffi-1.2.17-native.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.google.j2objc/j2objc-annotations/1.1/976d8d30bebc251db406f2bdb3eb01962b5685b3/j2objc-annotations-1.1.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.codehaus.mojo/animal-sniffer-annotations/1.17/f97ce6decaea32b36101e37979f8b647f00681fb/animal-sniffer-annotations-1.17.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.github.jnr/jffi/1.2.17/6ffa5106be5a121bea9d0779cd757e804633e543/jffi-1.2.17.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-commons/5.0.3/a7111830132c7f87d08fe48cb0ca07630f8cb91c/asm-commons-5.0.3.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-analysis/5.0.3/c7126aded0e8e13fed5f913559a0dd7b770a10f3/asm-analysis-5.0.3.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-util/5.0.3/1512e5571325854b05fb1efce1db75fcced54389/asm-util-5.0.3.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-tree/5.0.3/287749b48ba7162fb67c93a026d690b29f410bed/asm-tree-5.0.3.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/5.0.3/dcc2193db20e19e1feca8b1240dbbc4e190824fa/asm-5.0.3.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.github.jnr/jnr-a64asm/1.0.0/a1cb8dbe71b5a6a0288043c3ba3ca64545be165/jnr-a64asm-1.0.0.jar:/home/happy0/.gradle/caches/modules-2/files-2.1/com.github.jnr/jnr-x86asm/1.0.2/6936bbd6c5b235665d87bd450f5e13b52d4b48/jnr-x86asm-1.0.2.jar:/home/happy0/projects/cava/crypto/out/production/classes:/home/happy0/projects/cava/junit/out/production/classes:/home/happy0/projects/cava/bytes/out/production/classes:/home/happy0/projects/cava/scuttlebutt/out/production/classes:/home/happy0/projects/cava/units/out/production/classes:/home/happy0/projects/cava/concurrent/out/production/classes:/home/happy0/projects/cava/io/out/production/classes:/home/happy0/projects/cava/scuttlebutt-handshake/out/production/classes com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit5 net.consensys.cava.scuttlebutt.rpc.PatchworkIntegrationTest,runWithPatchWork(io.vertx.core.Vertx)
Attempting RPC request...
Sending message?
Sending message?
We received a message?
<EMAIL_ADDRESS>Sending message?
We received a message?

Sending message?
We received a message?
<EMAIL_ADDRESS>Sending message?
2019-03-23 13:50:23.058+0000 DEBUG [localhost:8008] Failed to decrypt message header
net.consensys.cava.scuttlebutt.handshake.StreamException: Failed to decrypt message header
	at net.consensys.cava.scuttlebutt.handshake.SecureScuttlebuttStream.decryptMessage(SecureScuttlebuttStream.java:110)
	at net.consensys.cava.scuttlebutt.handshake.SecureScuttlebuttStream.decrypt(SecureScuttlebuttStream.java:85)
	at net.consensys.cava.scuttlebutt.handshake.SecureScuttlebuttStream.readFromServer(SecureScuttlebuttStream.java:53)
	at net.consensys.cava.scuttlebutt.handshake.vertx.SecureScuttlebuttVertxClient$NetSocketClientHandler.handle(SecureScuttlebuttVertxClient.java:91)
	at io.vertx.core.net.impl.NetSocketImpl$DataMessageHandler.handle(NetSocketImpl.java:392)
	at io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:225)
	at io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:123)
	at io.vertx.core.net.impl.NetSocketImpl.handleMessage(NetSocketImpl.java:370)
	at io.vertx.core.net.impl.ConnectionBase.handleRead(ConnectionBase.java:386)
	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:320)
	at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:43)
	at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:188)
	at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:174)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.lang.Thread.run(Thread.java:748)
Sending message?
Sending message?
Sending message?
Stream closed?

java.lang.IllegalStateException: Socket is closed

	at io.vertx.core.net.impl.NetSocketImpl.writeMessage(NetSocketImpl.java:114)
	at io.vertx.core.net.impl.NetSocketImpl.write(NetSocketImpl.java:159)
	at io.vertx.core.net.impl.NetSocketImpl.write(NetSocketImpl.java:137)
	at net.consensys.cava.scuttlebutt.handshake.vertx.SecureScuttlebuttVertxClient$NetSocketClientHandler.lambda$handle$2(SecureScuttlebuttVertxClient.java:84)
	at net.consensys.cava.scuttlebutt.rpc.PatchworkIntegrationTest$MyClientHandler.sendMessage(PatchworkIntegrationTest.java:85)
	at net.consensys.cava.scuttlebutt.rpc.PatchworkIntegrationTest.runWithPatchWork(PatchworkIntegrationTest.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:532)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:108)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:112)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:112)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:74)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Process finished with exit code 255

Sometime it succeeds:
Attempting RPC request...
Sending message?
Sending message?
Sending message?
Sending message?
We received a message?
   >����
Sending message?
Sending message?
We received a message?
<EMAIL_ADDRESS><EMAIL_ADDRESS>We received a message?
<EMAIL_ADDRESS><EMAIL_ADDRESS>Sending message?
Sending message?
We received a message?
<EMAIL_ADDRESS>We received a message?
<EMAIL_ADDRESS>Sending message?
We received a message?
<EMAIL_ADDRESS>We received a message?
<EMAIL_ADDRESS>We received a message?
<EMAIL_ADDRESS>

Some of the time, meaning we're having threading issues. This reminds me of what I do to for rlpx, when I had to synchronize getting messages and reading them, so the nonces (or digests) would not be consumed out of order.
So pretty much have to add synchronized blocks in the code. I can do that.

Here is a fix: #200
Pretty sure most of the problems came from what happens if the message is properly consumed entirely and I didn't reset buffers then.

Thanks for looking into it, @atoulme =].
I still get to error sometimes after checking out that branch. I was wondering if this https://github.com/atoulme/cava/pull/2 might be a fix?
Rather than setting the buffer to Bytes.NONE, i think we should maybe be setting it to anything that remains in the buffer after we've processed the complete messages in the buffer?
    if (isClientToServer) {
      clientToServerBuffer = messageWithBuffer.slice(index);
    } else {
      serverToClientBuffer = messageWithBuffer.slice(index);
    }

This is tricky stuff! The test runs without error with the above, but I'm not sure if it's right.

Yes, I just force pushed a change to that effect. Assuming build goes back green we are a go.

haha! the force push explains it. i looked at your original PR again and thought 'huh.. the code was already like that? and there's one commit.)
Thanks @atoulme =]

Force push is how I am never wrong, ever.

haha! mad with power, rewriting history

Closing this issue.


Add ability to set system and runtime deps

With this change images have new properties which allow the
user to set system and runtime dependencies. For instance:
dispatch create image python3-with-deps base-python3 --runtime-deps requirements.txt

This would automatically add the packages listed in requirements.txt
(pip format) into the image.  This opens up a lot of new use-cases.
The intent is the language/package manager support is pluggable.
Hopefully, that can be seen in this change.
Next steps are to move the faas support into the function creation
which would eliminate faas specific images and base-images.
Testing Done:

e2e tests added and pass
unit tests added and pass
manual testing

$ INSTALL_DISPATCH=0 ./e2e/scripts/run-e2e.sh e2e/tests
=> running clean first
✓ Clean all
1 test, 0 failures
=> e2e/tests/apis.bats
✓ Create Images for test
✓ Create Functions for test
✓ Test APIs with HTTP(S)
✓ Test APIs with HTTPS ONLY
✓ Test APIs with Kong Plugins
✓ Test APIs with CORS
✓ Cleanup
7 tests, 0 failures
=> e2e/tests/functions.bats
✓ Batch load images
✓ Create node function no schema
✓ Execute node function no schema
✓ Create python function no schema
✓ Execute python function no schema
✓ Create node function with schema
✓ Execute node function with schema

Validate schema errors (skipped: schema validation only returns null)
✓ Create python function with runtime deps
✓ Execute python function with runtime deps
✓ Delete functions
✓ Cleanup

12 tests, 0 failures, 1 skipped
=> e2e/tests/events.bats
✓ Batch load images
✓ Create node function with schema
✓ Create subscription
✓ Emit event
✓ Delete subscription
✓ Cleanup
6 tests, 0 failures
=> e2e/tests/secrets.bats
✓ Batch load images
✓ Create secret
✓ Create function with a default secret
✓ Create function without a default secret
✓ Execute function with a default secret
✓ Execute function without a default secret

Validate invalid secret errors (skipped: secret validation only returns null)
✓ Update secret
✓ Delete secrets
✓ Cleanup

10 tests, 0 failures, 1 skipped
=> e2e/tests/images.bats
✓ Base image creation
✓ Image creation
✓ Delete images
✓ Delete base images
✓ Batch load images
✓ Batch delete images
✓ Cleanup
7 tests, 0 failures
finished


VISTA rebuild

Elections Office hired a contractor to rebuild the system, and we will coordinate in FY24 Q4 to build some scripts to ETL some data for use in this system


How Run  Python as sidecar without stopping it  with a tauri app

Discussed in https://github.com/tauri-apps/tauri/discussions/8135

Originally posted by smith0022 October 30, 2023
so basically i have a python script that should run in parallel with the tauri app ,the react side communicates with python script using websocket and this communication has to be continuous.so i tried to bundle it but then it executes the whole file and i want to make run in parallel

Let's keep it in the discussion for now :)


Add number of times a Campaign has been assigned to Zone

Add them in zoneList(campaigns), campaignList(Included in zones) from handlebars helpers

Each helpers has below

number of campaigns: Placement.length
number of Inlcuded in zones: CampaignAssignments.length


[8.x] Factories do not resolve nested relationships

Laravel Version: 8.11.2
PHP Version: 7.4.8
Database Driver & Version: N/A

Description:
When creating relations through the Factory::has() method nested relations are not created.
Example (I skipped the factories, because nothing except for the relations is really relevant here)
class A extends Model
{
    public function b()
    {
        return $this->hasOne(B::class);
    }
}

class B extends Model
{
    public function c()
    {
        return $this->hasOne(C::class);
    }
}

class C extends Model
{
    //
}

And then:
A::factory()->has(B::factory()->hasC())->create(); // Will create an A with a B, but no C
A::factory()->has(B::factory()->has(C::factory())->create(); // Same thing

~The problem appears to lie in the Relationship and BelongsToManyRelationship classes, which never call Factory::createChildren() (which is a protected method)~
Steps To Reproduce:

Create the models as detailed above, with model factories
Create a test containing part 2 of my example

Gonna forward this one to Taylor to see if that's intended or not.

I just tried it on a fresh Laravel application and was able to reproduce it, I'll try to debug further

How did you reproduce it?

I created a new Laravel app and added the models A, B and C including migrations and tests however this time even B is not being created, so I think I must be doing something wrong otherwise a lot more people would be running into this issue.
Example code is here (this line is where the test fails)

You're using belongsTo to link A and B but you're creating B from A as if it was a child.

Ah it seems this was the issue (it was actually a copy-paste error in the example I created, but I think it will probably be something similar in my actual project) thanks for checking 👍


Edits to inline help topics

Alex wrote new inline help topics and asked for a copy edit.

Merge to nightly only
No back porting

Deploy preview for calico ready!
Built with commit 57a2415f75b089a4bd8f92a3abe18a79d8e2006d
https://deploy-preview-3244--calico.netlify.com


⚠ Bofrost.lu has degraded performance

In 0611e45, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1026 ms

Resolved: Bofrost.lu performance has improved in 8942f55.


Release 1.0.0rc1

Fixed

Fixed Python constraint propagation when converting a package to a dependency (#84).

Missing: https://github.com/python-poetry/poetry-core/pull/81

@abn Fixed

@sdispater can you also add this change here? https://github.com/python-poetry/poetry/pull/2962/files seems something is broken on windows.

@abn Done


Oa feat/styles

Styles changes for a new look and feel.
A screen shot is below.
We could move bower_components inside of public with the .bowerrc file so We can delete the theme from github.
I didn't want to move any further, in case you guys didn't like it or had some other ideas.
Main Files Changed:

public/client/css/main.css
public/index.html
public/client/views/UserDetailsView.js

Omar, I really like it, but I don't want to merge this for the reason you mentioned -- let's get the theme and the random .DS_store files ignored and resubmit before we merge it in (especially if bower is being used to get the theme installed).


Acknowledge/document sampling behavior in README

Cloudflare Analytics Engine samples data (and you'll notice the code accounts for this sampling in its queries). It's worth acknowledging that values returned by the engine – and displayed to the user – could be sampled.
Brought up here: https://twitter.com/moonage_dev/status/1752743486892200046

Addressed here 8ca77e2


Implement GET /variants/{id}

Issue #528

@jeromekelleher this is ready for review... writing tests now...

Looks good @dcolligan, thanks. I'm not totally blown away by the current organisation --- it seems a bit brittle and piecemeal somehow.  Is there any way we can push the ID generation and parsing into the DataObject hierarchy, and keep all of the ID processing logic in one place? The CompoundId abstraction is clever, but I think ID management is a fundamental part of the responsibilty of the DataObjects and it would be great if we could keep it all in one place.
I don't have a strong notion of how to do this though, so perhaps the best approach is to continue with the way you're doing things and perhaps refactor afterwards.

This is good progress @dcolligan, thanks. I'd like to see some systematic and data driven tests here. Are we generating the correct ID for variants? If we get some variants by a search query, and send back get requests, do we get exactly the same variant?

@jeromekelleher pushed an update...
I think the CompoundId abstraction is a good one.  We may want to create or parse ids outside of the context of a data object, so I think keeping it has not part of the data object hierarchy makes sense.  I would propose a refactor that used CompoundIds across the code, getting rid of all the id.split(':') and ':'.join(idSplits) and '{}:{}'.format(idPart1, idPart2) statements scattered around the code.
Also, I'm a bit confused about when the vcf records' start attr is supposed to be 1-indexed... do we want it to be 1-indexed in our ids?  (see failing tests)

@jeromekelleher any thoughts on this?
(ps I also sent you an email)

Looking at some other issues, they're all sort of tied in with this idea of the compound ID now. I think it would be good if we could pull the basic compound ID stuff out of this, and make it it's own PR (possibly on top of #545). Hopefully we can start making progress on several fronts then, and not get tied up with implementing getVariants (which is the most difficult, I think).

Ok, good idea.  I'll merge #545 and then do a compoundId refactor.

Closing... submitting in another PR...


[FR] Is it possible to export all items for backup?

Assume I used Notepad for quite a long time and there were already hundreds of text items I created in the past.
If I want to export all of these text to another phone, is there a way to backup/export all of them instead of clicking into each text and save single text item to sdcard one-by-one?

Yes, it's possible.
Your notes will be exported as one txt file per note, inside a folder you choose. You can use txt files from a folder to import notes as well.

To import all your notes, click this icon:

Select Import notes
Navigate to the folder where you have the txt files and click on the three dots menu, click on Select All, click on Select

Thanks. Is it a new feature in the recent release?

It seems to have been available since 2018 or so

Thanks!


Help icon next to "Wait for successful checks" should not navigate out of the page

...or at least it should ask the user in the case when they have edited the contents of the commit message prior to merge.
I hadn't noticed the checkbox before, so I clicked the help button next to it while I was preparing a merge, thinking that it would show a modal box or tooltip with some info. Instead, it was a simple link that took me straight to this #975 (which IMO is not satisfactory documentation, although I agree it's better than nothing), making me lose the changes to the commit message I had composed prior to the merge.
I think the ideal solution would be for the help icon to show in-context help (one or two sentences should do) in the form of a pop-up tooltip-like box, but detecting whether the commit message box has been edited and making the browser display the native "are you sure you want to leave this page" dialog would also work.

The help icon should indeed have a tooltip. If it doesn’t, that’s a regression.

I can't say for sure that there wasn't one. I might have just missed it.

It can and should probably link to a new tab instead of changing the current page.

:+1:

(Try closing the tab to test this feature)

I don't currently have any PRs open with pending checks, but I'll try to remember to try closing the tab the next time I am in that situation, to test this.


Where do you get the .deb files from?

Making an issue since I can't talk in the Discord without verifying by a phone number which I don't have. Where on earth do you get the .deb files from? The installation instructions for a jailbroken device say you can get them from Github actions but I don't know what that means or what I should be doing to get them. I did search in the Discord but the only files linked don't work since they require iOS 13 and I'm stuck on 12. Why can't there just be prebuilt releases like every other project?

(written instructions are in the alt text of each image)

Thank you


[Pipeline] Convert mldesigner primitive annotation to Input type

Description
from mldesigner._input_output import String, Boolean, Number, Integer, EnumInput

@dsl.pipeline()
    def pipeline_with_primitive_annotations(
            str1: String,
            str2: String(optional=False, description="string annotation"),
            boolean1: Boolean,
            boolean2: Boolean(optional=False, description="bool annotation"),
            number1: Number,
            number2: Number(optional=False, description="number annotation", min=-1.0, max=1.0),
            integer1: Integer,
            integer2: Integer(optional=False, description="int annotation", min=-1, max=1),
            enum: EnumInput(enum=SampleEnum),
    ):
        component = component_with_primitive_annotations(
            str1=str1,
            str2=str2,
            boolean1=boolean1,
            boolean2=boolean2,
            number1=number1,
            number2=number2,
            integer1=integer1,
            integer2=integer2,
            enum=enum
        )
        return component.outputs

Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
All SDK Contribution checklist:

[ ] The pull request does not introduce [breaking changes]
[ ] CHANGELOG is updated for new features, bug fixes or other significant changes.
[ ] I have read the contribution guidelines.

General Guidelines and Best Practices

[ ] Title of the pull request is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[ ] Pull request includes test coverage for the included changes.

API change check
API changes are not detected in this pull request.


Should accept Uint8Array as Array / data or bytes type

It's a pain having to convert between all kinds of array / bytes types. We should consider a connonical way to encode/decode between data and accept common forms of data like Uint8Arrays.

[!NOTE]

Incoming from https://github.com/FuelLabs/fuels-ts/discussions/1545

Steps

[x] Add runtime support for passing Uint8Array as Vec<8> (#2018)
[ ] Add typegen support for passing Uint8Array as Vec<u8>
[ ] ...more?

I suspect this was resolved by the changes here and here as I can't see any other type that should accept bytes/array in this way, any thoughts @FuelLabs/sdk-ts?

@danielbate Did you see this comment? It seems related.

That seems related to typegen, re #2784

@Dhaiwat10 Closed as not planned?

@arboleya I closed this via Linear as 'canceled', since the team decided that we will not be working on this issue at the moment

Could you please summarize the reasoning behind the decision?

@anderson.arboleya sure:The team decided that working on this issue will require a lot of work deep down the codebase of the abi-coder/typegen. It will probably require a significant amount of refactoring as well. The team decided that it is a better idea to not work on this right now so that we can focus on other priority issues, and to avoid any breaking changes at this moment


[Masthead] Mobile - On tab key from close icon focus is going to the non available (disabled) element - DDS Consulting

Detailed description
Issue:
Hitting tab key from close icon focus is going to the non available (disabled) element on the page and is operable as well.
Note:- This defect is not consistent.
Expected:
Tab focus should not go to the disabled elements
Additional information

Hybrid Cloud developer:  @mwanberg
HC Jira ticket: https://jsw.ibm.com/browse/HC-2164
DDS consultant:  Anna

@mwanberg What's the status on this issue?

@proeung After chatting with @IgnacioBecerra, we think this might be a Storybook-specific issue. We are not able to reproduce at all on live pages, and only intermittently on the Canary build.

@IgnacioBecerra @proeung @mwanberg This issue is observed on desktop browsers at 200% zoom i.e. ( Mobile view)
Issue:

Hitting tab key from close icon focus is going to the non available (disabled) element on the page and is operable as well.
Navigate backward with Shift + tab. After the browser elements, focus is going to the background elements (User Profile, Search, IBM logo).
After reaching, focus is getting trapped between 'Covid 19, Business Solution, Action Guide' options itself. Even 'Back' button is not operable using keyboard as well as mouse.

@IgnacioBecerra While retesting issue #6623 Praveen discovered that this bug happens in both React and Web Components.  Increasing the scope of this issue.  Sorry
cc:  @Praveen-sr


db vs repeatable

In your security service cfc you use repeatable and db repeatable encryption.  What are the differences/use cases for those?
And do you have examples for how you're using the form/url encryption methods?  I would like to encrypt/hash form/url field names too and I'm looking for best practices.

The use case for 'repeatable' encryption is username, typically. When searching for the user to log them in your are guaranteed to find the record since the standard 'db' encryption will produce a different result on each pass (if not using custom initialization vectors, anyway)
The use case for 'rform' encryption is typically guid values that must be accessed by javascript, for the same reason (predictable, repeatable, yet still secure , values)
For examples of usage your best bet is to check out the guides I wrote on obfuscation, encryption, authentication and session management on cfdocs - If you start here: https://cfdocs.org/security and scroll down to the bottom of that page it will link you to those additional topics, or you can click 'guides' up top and look for those topics.
Those are a little bit dated, but should give you solid examples of where and when to use encryption techniques... and then you can see how those are implemented in this framework one example here for better context.
I also presented on this topic a few times at conferences in the past that are recorded. The most recent one, I believe, is available here: https://www.youtube.com/watch?list=PLz6r7YssJoKRKB50ZSGTo_oX7ojYcF9TS&v=bxBywc39P1A
HTH


improves type generics for get and getAll

I noticed that the type generics for get and getAll can be improved to be more accurate and restrictive (especially for getAll).
First, let's define the following type — edge config is basically a json store, so any value in the edge config must be a valid JSON value.
type JsonValue =
  | string
  | number
  | boolean
  | null
  | { [x: string]: JsonValue }
  | JsonValue[];

export type EdgeConfigValue = JsonValue;

getAll
Previous type definition for getAll:
getAll: <T = any>(keys?: (keyof T)[]) => Promise<T | undefined>;

Issues:

It's incorrect to allow the response to be any type. We know that getAll always returns a record (JSON object), so the return type should be typed as a Record. Currently,  calling getAll<string> would return a response string, which is never possible. The return type should actually be more like Record<string, string>.
We can default T to EdgeConfigValue.
If keys is defined, we can infer the keys of the Record based on the keys that's passed in.

Examples:
const a = await getAll()
// a: any
// expected: a: Record<string, JsonValue>

const b = await getAll<string>()
// b: string
// expected: b: Record<string, string>

const c = await getAll(['foo', 'bar'])
// c: any
// expected: c: Partial<Record<'foo' | 'bar', JsonValue>>

New type definition:
  getAll: <
    T extends EdgeConfigValue = EdgeConfigValue,
    K extends string = string,
  >(
    keys?: K[],
  ) => Promise<Partial<Record<K, T>> | undefined>;

Examples:
const a = await getAll()
// a: Partial<Record<string, EdgeConfigValue>> | undefined

const b = await getAll<string>()
// b: Partial<Record<string, string>> | undefined

const c = await getAll(['foo', 'bar'])
// c: Partial<Record<'foo' | 'bar', EdgeConfigValue>> | undefined

Note: I wrapped the Record in Partial because the keys are not guaranteed to exist. For example:
// edge config: { x: 'x' }

const a = await getAll(['foo']) // returns {}
// a.x = undefined

get
Before:
get: <T = any>(key: string) => Promise<T | undefined>;

After:
  get: <T extends EdgeConfigValue = EdgeConfigValue>(
    key: string,
  ) => Promise<T | undefined>;

P.S. I didn't see any contributing guidelines but I just went ahead and made a PR, hopefully y'all don't mind!

Thanks a ton for this detailed writeup.
I ended up going for a slightly different approach in #67 that's totally based on the work you prepared in this PR. I couldn't merge this PR as we recently split up the index.ts file into index.node.ts and index.edge.ts so it had merge conflicts.
I gave you a shout-out in the changelog and hope that makes up for it :)


deal with pip dependencies

Right now everything is pinned to specific dependencies but not everyone can get those specific libraries. Need to figure out ranges that are compatible and use those in settings.ini instead

It seems to be fixed as of b0d0628


Part of the content is not displayed

Attach (recommended) or Link to PDF file here: test.pdf
Configuration:

Web browser and its version:  chrome 92.0.4515.107
Operating system and its version: maxos catalina 10.15.7
PDF.js version: 2.11.56
Is a browser extension: no

Steps to reproduce the problem:

open https://mozilla.github.io/pdf.js/web/viewer.html
upload my file

What is the expected behavior? (add screenshot)

What went wrong? (add screenshot)

Due to some reasons, some of the content is not displayed, but I am not sure what the specific reason is. Our project is using pdfjs. I would like to ask you to help analyze the reason. Thank you for your reply.

The document contains corrupt font data, which even Adobe Reader (i.e. the PDF reference implementation) cannot render successfully.


fix: typos

Fixes grammar issues.
Standardize @see formatting. (Typically there should be a newline between a JSDoc body and any JSDoc tags.)

If you want a lint rule to verify JSDoc formatting + JSDoc complete sentences (i.e. erroneous missing periods) going forward, I've already written one.

If you want a lint rule to verify JSDoc formatting + JSDoc complete sentences (i.e. erroneous missing periods) going forward, I've already written one.

I think this could be useful. Whatya think @nexxeln @c-ehrlich. It should be on this repo though and not the scaffolded app

If you want a lint rule to verify JSDoc formatting + JSDoc complete sentences (i.e. erroneous missing periods) going forward, I've already written one.

I think this could be useful. Were trying to educate as much as possible through good comments and links to references so good to have it uniform.
Whatya think @nexxeln @c-ehrlich. It should be on this repo though and not the scaffolded app

Yeah jsdoc would be nice on this repo.

i'll do another pr after this one to add the lint rule, since it will likely pick up other changes

I cant update the branch - seems like you have disabled maintainer edit priveledge?

I cant update the branch - seems like you have disabled maintainer edit priveledge?

I haven't done that. you can see proof here that you can edit the branch: https://github.com/t3-oss/create-t3-app/pull/1144/commits/b65f7c7f2c94677fb5c2fdca9595559c4c4a583d

i think typos in past release notes should be changed as a matter of principle.
is there some technical reason that doing so would cause problems?


Bot no longer working

I comment out the stocks)exchange out of the coding and it just refreshes and I have been finding block like crazy and not one is being pushed to Discord.
I have made sure that the parameters are correct i have even installed it on a different server with a new VPS and new webhook and it is still not reporting

Well that is weird after I deleted out the stocks exchange it took the bot about 5 hours to start working again.


Include a library of damage curves for buildings and infrastructure

PiecewiseLinearDamageCurve can read damage curve data (relating hazard intensity to damage fraction) from a file and scale/translate/interpolate curves to generate variations, e.g. for sensitivity analysis. So far, curve data must be provided by the user.
Suggestion:

provide a library of damage curves from the literature
read/load and select relevant curves for given assets and hazards
include sufficient metadata for proper use and attribution
contribution of new curves should be straightforward
pip install should bring any data needed without a separate step

Questions:

how should the interface to read/load/select a curve work?
what metadata is needed or optional?

@snirandjan - may be of interest, specifically to include damage curves from your review

Nirandjan, S., Koks, E. E., Ye, M., Pant, R., van Ginkel, K. C. H., Aerts, J. C. J. H., & Ward, P. J. (2023). Dataset: Physical Vulnerability Database for Critical Infrastructure Multi-Hazard Risk Assessments [Data set]. In Review article: Physical Vulnerability Database for Critical Infrastructure Multi-Hazard Risk Assessments – A systematic review and data collection (V1.0.0). Zenodo. https://doi.org/10.5281/zenodo.10203846


Impeller does not emulate SK_LEGACY_IGNORE_DRAW_VERTICES_BLEND_WITH_NO_SHADER

The Flutter engine builds Skia with #ifdef SK_LEGACY_IGNORE_DRAW_VERTICES_BLEND_WITH_NO_SHADER enabled.
This makes SkCanvas::drawVertices override the blend mode with SkBlendMode::kDst if the SkPaint has no shader.
(see https://github.com/flutter/flutter/issues/118262)
Impeller does not currently implement this.  Flutter applications that rely on this behavior will need to explicitly specify BlendMode.dst when calling Canvas.drawVertices.

See also: https://github.com/flutter/flutter/issues/118262
IIRC canvaskit doesn't currently respect this either.

This seems like an easy fix in the Aiks layer. Can we just match behavior or are we not convinced we should.

If we don't have a strong opinion, I suggest matching current mobile Skia behavior since we are replacing it. Just to make the transition the least surprising as possible.


page unresponsive running Lighhtning-demo.ipynb

🐛 Bug
I'm getting this when running the demo:

To Reproduce
Steps to reproduce the behavior:

click MNIST hello world on https://github.com/PyTorchLightning/pytorch-lightning
run in colab

I feel if it's unresponsive because of tqdm, then a print statements wit the status would a reasonable way to go.

Yes, tqdm creashed colab when updated too fast.
set Trainer(progress_bar_refresh_rate=20) or something high

even at 20, unfortunately, I still get thhe same issue. :(


The beginLinearGradientStroke method doesn't work properly when ignoreScale=true.

Hi I'm using easeljs in order to develop a canvas chart library. So when I try to draw a bar with linear gradient stroke it is drawn only with last color in colors' array just like ordinary beginStroke() call.
I need to use ignoreScale = true parameter because in my project I need to handle zoom in/out events
and then change scale of parent container. Here is isolated code example.
P. S. I use createjs-collection build from npmjs: https://www.npmjs.com/package/createjs-collection
shapes.graphics.setStrokeStyle(1, 0, 0, 10, true)
           .beginLinearGradientStroke(["black", "white"], [0, 1], 0, 0, 0, 150)
           .drawRect(0, 0, 50, 150).endStroke();

The ignoreScale works by resetting the canvas context before stroking the path. This use-case was never considered. We might look at a workaround, but for now its a fact-of-life.
Great find.


move function DisableAllStages from protected to private

move function DisableAllStages from protected to private

@gbaned it has been stuck here for a long time. Please take a look at it.

@gbaned it has been stuck here for a long time. Please take a look at it.

@leike666666 Sorry for the slow response, it is waiting for internal approval. Thank you.


Remove mention of group exclusion

Group exclusion is no longer supported for baseline policies only user exclusion

@jcardena : Thanks for your contribution! The author, @MarkusVi, has been notified to review your proposed change.

#sign-off


Rebasing from userNS image to Main and cannot launch any programs

Describe the bug
To Reproduce
Steps to reproduce the behavior:

Running kinoite-main-userns image
Rebase to kinoite-main-hardened without userns
Try to launch any flatpak (for example flatseal)
Error returned that bwrap failed to create new namespace: permission denied. Ldconfig failed, exit status 256

Expected behavior
new image will function correctly without userns needs for flatpak
Actual behavior
I'm sure that I'm doing something wrong, so hopefully it's a simple thing that someone can lead me in the right direction. I don't use discord or else I would ask there.  I rebased to the kinoite main image because I saw that the userNS image I was on is being phased out.  I did read the recommendations and figured I'd have to tweak to make Steam work, but it seems like there's some configuration going on with bubble wrap perhaps that's preventing most of the programs from launching at all, and I assume it's because they are flatpaks (including the preinstalled chromium?)
Your current image
41.20241223.0 (I would copy and paste all the text, but I can't open a web browser in the installation right now so I'm just typing in the relevant info here)
¹For all images**
-It seems like this last bullet point is asking about reproducing it on a UBlue image, but I don't have any other installs?

How old was your previous deployment?
This is an old issue but only if the image you're rebasing from has rpm-ostree 2024.8 or lower
Generating any kind of new deployment and rebooting will fix jt

Hmmmmm ... I was updating it  almost every day using rpm-ostree update, so I don't think that my deployment was very old. Unless there was some error that I wasn't noticing that kept it from updating.  I'm glad to hear that there's a fix that shouldn't be too complicated, but what does it mean to generate a new deployment?  I would have imagined it was rebasing, but I just did that of course.
How would I generate a new deployment?  I apologize for my ignorance on that, the atomic structure is a bit new to me.

OK, So I have worked on this a bit over the last two days, and I think I managed to make another deplyoment by removing a layered package and updating.  Now my flatpaks are working again, but Chromium oddly is NOT.  When I run the Chromium binary from the shell ./usr/bin/chromium-browser, I get the following error:

Checking version
Installed version:<PHONE_NUMBER>
Package version:<PHONE_NUMBER>
No need to update, versions match
[4290:4290:1225/200524.133288:ERROR:process_singleton_posix.cc(358)] The profile appears to be in use by another Chromium process (3094) on another computer (fedora). Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium.
[4290:4290:1225/200524.133344:ERROR:message_box_dialog.cc(190)] Unable to show message box: Chromium - The profile appears to be in use by another Chromium process (3094) on another computer (fedora). Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium.

It's worth mentioning that I got a similar warning about another profile active when I opened LiibreOffice Writer.  I have no idea what that means.  Is this related?

After some research into this, it appears that probably this was caused by rebasing to the new image that uses a different hostname?  If this is the case, then I assume I can simply remove the singletonlock file as discussed here, as that does seem to resolve the errors.
I want to make sure whatever I am doing is the correct process, so please correct me if I am wrong about anything so far, but I think that makes sense to me.  Are there any other things/issues I should check anent the rebase to the new Main-hardened image that might crop up later?
Also, thanks for what you are doing!  I think this project has potential to be very valuable project for the open source world, and I'm happy to support it!

Hmmmmm ... I was updating it almost every day using rpm-ostree update, so I don't think that my deployment was very old. Unless there was some error that I wasn't noticing that kept it from updating. I'm glad to hear that there's a fix that shouldn't be too complicated, but what does it mean to generate a new deployment? I would have imagined it was rebasing, but I just did that of course.
How would I generate a new deployment? I apologize for my ignorance on that, the atomic structure is a bit new to me.

np, essentially all rpm-ostree operations generate a new deployment
rpm-ostree install? new deployment
rpm-ostree upgrade? new deployment
rpm-ostree rebase? new deployment
etc
new deployment meaning that a new root filesystem will be booted into on next boot.

updating it almost every day using rpm-ostree update

were you rebooting after updating? updates don't take effect unless you reboot.

Also, thanks for what you are doing! I think this project has potential to be very valuable project for the open source world, and I'm happy to support it!

appreciate it
closing this as it appears the issue is solved. let me know if that's not the case


[Android][Image Rendering] - Resource Resolver gets same url request for multiple cards.

Platform

Android

Version of SDK
1.2.10 (Maven Repository)
Issue
Getting same URL request from multiple cards in custom resource resolver at client and the cards have different URL embedded in type Image in json payload which is getting feed in SDK. So, same image is getting rendered in multiple cards and actually the images should be different as cards has different URL attached.
This scenario is coming in CardSchool bot. When we open our fragment multiple cards gets loaded in this list and the request of json goes to SDK with URL embedded in it. The request for image to custom resource resolver is coming and the count of request is also the same respect to the images in the json payload. The URL is coming same for some of the cards request and all cards has different URL embedded in json before feeding the data to SDK.
One more observation I have respect to this issue. When we do fast scroll in the listview which has multiple cards in it. Same case comes in which image of some other cards comes in some other cards. It seems that the AsyncTask which is present in SDK for ImageRenderer gets wrong URL and it sends wrong URL to client resource resolver and client returns Bitmap based upon request. By looking in broad way it seems the parsing of json for Image URL and making of Async task for Image Renderer with that URL needs a look.
Example
Json1:
data: [{"body":[{"text":"Here is a logo","type":"TextBlock"},{"id":"0","size":"small","type":"Image","url":"thumbnail://cardcontents/info?messageId=27ba8460-b14b-11ea-bdd0-979d1baf1f0c&contentIndex=0"}],"type":"AdaptiveCard","version":"1.0"}]
Json2:
"body":[{"size":"medium","text":"Lesson 7: How This App Sends Cards","type":"TextBlock","weight":"bolder"},{"text":"This open source sample application is built using the [webex-node-bot-framework](https://github.com/webex/webex-bot-node-framework), which abstracts away some of the complexity of calling the Webex APIs. If you are planning on looking at this bot's source code, its helpful to have some background on this.  If you are just trying to get an overview of Buttons and Cards, you can jump to the next lesson.","type":"TextBlock","wrap":true},{"text":"This bot's [README](https://github.com/WebexSamples/webex-card-school/blob/master/README.md) talks more about how it works, but in a nutshell, the framework provides our app with a `bot` object each time our bot is added to a space.  The app logic can then call helper methods like `bot.say()` to send messages to the appropriate space.","type":"TextBlock","wrap":true},{"text":"For sending a card, our app can call `bot.sendCard()` and simply pass the card's JSON design, which could be copied directly from the designer, abstracting away the need to build a full `attachments` array. In our app we created an object for each card which contains the card's JSON, resulting in the following:","type":"TextBlock","wrap":true}, {"altText":"Picture of a bot.sendCard()","horizontalAlignment":"Center","id":"0","type":"Image","url":"thumbnail://cardcontents/info?messageId=3054f880-b14b-11ea-b4d3-070a5fad18ba&contentIndex=0"}
Multiple request coming to custom resource resolver from SDK with same URL key:
resolveImage key: 27ba8460-b14b-11ea-bdd0-979d1baf1f0c-0
resolveImage key: 27ba8460-b14b-11ea-bdd0-979d1baf1f0c-0
Because of this client is sending same image to multiple cards for rendering.
Android

Expected Behavior

Unable to repro while scrolling through multiple cards using different images (in our mobilechatapp) with our basic sample IResourceResolver implementation.
@almedina-ms any ideas?

@ankbat Alberto and I weren't able to repro this issue.
Can you verify by setting a debug breakpoint at the beginning of your resource resolver's resolveImageResource method, and then checking what is passed to the url argument?
Perhaps some additional information can help us:

Device/emulator used, and Android version?
When/how often does the issue occur?

Does it only occur if you scroll quickly as you mentioned, or does it also happen without scroll?
How many images are duplicated (do all your images get replaced by the same image, or is it just a few that are duplicated)?
Does this only occur across multiple cards (e.g. Card 1 and Card 2 show the same images), or does it occur within the same card (e.g. multiple images in Card 1 show the same image)?

What additional processing are you performing after receiving the image url?

@golddove
1: In custom resource resolver I only utilise the URI from override function and maximum times I have noticed that
override fun resolveImageResource(uri: String, genericImageLoaderAsync: GenericImageLoaderAsync, maxWidth: Int): HttpRequestResult<Bitmap>
gets called from SDK. The uri comes to be the custom URL which we have set in JSON payload.
thumbnail://cardcontents/info?messageId=27ba8460-b14b-11ea-bdd0-979d1baf1f0c&contentIndex=0
2: I have tested on both Emulator and Device.
Emulator : Android 8.1 - Pixel 3a
Device: Android 10 - One Plus 8
3: Yes, It occur sometimes on fast scroll and sometimes it occurs at initial level also while rendering card. I have noticed the initial level problem only on CardSchool.
4: Not all images gets duplicated in multiple cards. Just some of the images gets duplicated across the cards in the list.
5: Yes, it occurs in multiple cards only. I have never noticed this case in same card which contains multiple images.

@ankbat as discussed, please update the issue when you've tried again with v1.2.11 of the renderer, and any additional repro steps/criteria

@golddove Still need to test the image rendering in new library 1.2.11

Issue resolved at our end.


fix: accordian style

What does it do?
Fix accordian style, https://github.com/strapi/strapi/issues/20789

Hey @madhurisandbhor, here are the remaining issues:

After clicking on it, if my pointer leaves the hover state disappears but a blue border remains
https://github.com/user-attachments/assets/3aa90f7b-a74f-4c0b-ae7d-e7b4760a6abe
When hovering a disabled one, a blue border appears but it shouldn't be the case
https://github.com/user-attachments/assets/83df1601-40ca-49be-9813-f8e209dfc078
We shouldn't have icons on the "L" variant, because we'll need to remove them everywhere in the settings

The icon buttons in this variant don't have the right colors, maybe is there an override?

In a group we would need a border top or bottom on each accordion to separate them

@Lucas, should be ready now. Just a few comments:

After clicking on it, if my pointer leaves the hover state disappears but a blue border remains
https://github.com/user-attachments/assets/3aa90f7b-a74f-4c0b-ae7d-e7b4760a6abe

I think this is right. It's true that your pointer leaves but the focus is still on the element, the border disappear when you change the focus to another part, I think it's the right way.

The icon buttons in this variant don't have the right colors, maybe is there an override?

Yes, it's a override that only happens on the Storybook, is not happening at the CMS so I think is fine.

@remidej I think you can go ahead and merge since madhuri isn't here anymore

Yes @Feranchz took over the work, I just want Lucas to confirm the PR fixes the issue

Hey @Feranchz :)

The behavior was different in v4 but maybe it's better like this
Ok!

@remidej that's all good, let's merge it 👍


File auth backend should not be in cleartext

Currently, file auth uses base64 encoded files. We should be able to encrypt these files instead of using clear text.

Can you be more specific where the encryption is needed.  I believe its pretty standard for the username/password to be received as base64 encoded.  Additionally, I would expect the file to be mounted as a secret which is already base64 encoded and behind other Openshift security measures.  Is there a usercase we are missing to address a customer or security need?

I guess I'm wondering why we need this password backend at all.  We should either use the searchguard password auth backend, or do the auth in the oauth-proxy.
Passwords are typically stored as base64 encoded hashes e.g. sha512, then base64 encode the sha512 value.  A base64 encoded password is virtually cleartext.

This backend only exists because the default SG version is unable to handle Openshift service accounts which are in the form of system:serviceaccount:namespace:name or something to that effect.  Requests are generally encoded with the username/password as 'username:password'.  The default implementation splits on the first ':' which does not work for service accounts
This only exists for metrics because the oauth-proxy did not pass bearer token; I believe it has since been modified to do just that which would allow the SA used to the proxy to make it all the way through to ES.
I would suggest that we probably would be better spending our efforts making an acutal oauth backend which could resolve some of the hackyness that exists now and/or fix the metrics parts to rely on the SA


Add weekly archival option to FileTarget

This PR adds a Weekly archiving option to FileTarget.
The reasoning behind this change is that, for some projects, Daily archiving is too often and Monthly archiving is too infrequent.
Discussion
Typically weekly archival options, such as the Python TimedRotatingFileHandler, will require the user to specify the day of the week that archiving should occur. To implement this, we have two options:

Add a configuration option to the File target. Something like:<target xsi:type="File"
        name="file"
        layout="${defaultLayout}"
        fileName="${logFileDir}/my_program.log"
        archiveFileName="${logFileDir}/my_program_{#}.log"
        archiveEvery="Week"
        archiveOn="Sunday"            <-- a new archival option
        archiveNumbering="Date"
        archiveDateFormat="yyyyMMdd"
        maxArchiveFiles="14"
  />

Simply use the day of the week as the archiveEvery value:<target xsi:type="File"
        name="file"
        layout="${defaultLayout}"
        fileName="${logFileDir}/my_program.log"
        archiveFileName="${logFileDir}/my_program_{#}.log"
        archiveEvery="Tuesday"
        archiveNumbering="Date"
        archiveDateFormat="yyyyMMdd"
        maxArchiveFiles="14"
  />

Personally I feel that option 2 is easier for the user and also easier to implement, so that's what this PR will be focusing on. If you'd prefer option 1 or have another suggestion, please let me know.

Cool!
But its gonna conflict with https://github.com/NLog/NLog/pull/1993 I guess

Codecov Report

Merging #2000 into master will increase coverage by <1%.
The diff coverage is 0%.

@@           Coverage Diff           @@
##           master   #2000    +/-   ##
=======================================
+ Coverage      82%     82%   +<1%
=======================================
  Files         285     285
  Lines       19590   19592     +2
  Branches     2290    2290
=======================================
+ Hits        15988   15992     +4
+ Misses       3050    3049     -1
+ Partials      552     551     -1

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 4539f52...26ca938. Read the comment docs.

@304NotModified Oh I didn't see that one. How would you like me to handle that? Merge into that branch? Just continue with this PR into master?

A couple discussion points:

I'm not familiar with the xunit framework - I typically just use the MSTest framework because my projects are small.
I can add tests for the CalculateNextWeekday function, but I'm pretty lost when it comes to actually testing the rollover and whatnot. Any tips?

It feels a bit silly essentially recreating the DayOfWeek enum. Do you have any suggestions for this?

I'll be squashing into reasonable commits (likely just 1 or 2) before removing WIP.

@304NotModified Right now the changes looks quite minimal, so it doesn't have to wait for #1993
@dougthor42 Remember also to add your new enums to TruncateArchiveTime() and PreviousLogOverlappedPeriod()

I wasn't sure how I should handle the possible NullRefEx, so I decided to make it a non-issue. See the conversation on the outdated diff and let me know if you want a different solution.

thanks! Will try to check in-depth this weekend.

I think I got everything. Let me know if there's more or if I should squash and remove WIP.
Also, how about documentation? Is that part of the source or is it just on the Wiki? (I'm primarily a Python dev and we have our reStructuredText docs in the source.)

Also, how about documentation? Is that part of the source or is it just on the Wiki?

Just the wiki. If you could add some docs and  "introduced in NLog 4.4.4", that would be great!

great will merge it when the docs are ready :)

I modified the wiki for FileTarget. Let me know if there's anything else you'd like me to do. Otherwise, I'm all done!

an example on https://github.com/NLog/NLog/wiki/File-target (bottom) would be great!

close/open to trigger CI

Example added to the wiki
👍

Merged!

Thx!

NLog 4.4.4 is live! https://www.nuget.org/packages/NLog/4.4.4