boot2docker(v 1.4.1 and 1.5) bad cert issues on OSX 10.9.3

Keep running into the following error I attempt to run the hello-world app.
An error occurred trying to connect: Post https://<IP_ADDRESS>:2376/v1.16/containers/create: remote error: bad certificate
Have attempted to do boot2docker stop,delete and init multiple times. Also tried manually removing the .bootdocker directory and starting over
The following is what I see in the /var/log/docker.log file
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst <IP_ADDRESS>/8 -j DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -D PREROUTING -j DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -D OUTPUT -j DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -F DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -X DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -N DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -A OUTPUT -m addrtype --dst-type LOCAL ! --dst <IP_ADDRESS>/8 -j DOCKER]"
time="2015-04-10T18:25:26Z" level="info" msg="-job init_networkdriver() = OK (0)"
time="2015-04-10T18:25:26Z" level="debug" msg="Restarting containers..."
time="2015-04-10T18:25:26Z" level="info" msg="docker daemon: 1.4.1 5bc2ff8; execdriver: native-0.2; graphdriver: aufs"
time="2015-04-10T18:25:26Z" level="info" msg="+job acceptconnections()"
time="2015-04-10T18:25:26Z" level="info" msg="-job acceptconnections() = OK (0)"
2015/04/10 18:08:43 http: TLS handshake error from <IP_ADDRESS>:53358: tls: failed to verify client's certificate: x509: certificate has expired or is not yet valid

I see this too sporadically. I run:
boot2docker stop
boot2docker delete
boot2docker init
boot2docker start
and it goes away. But keeps coming back...

Yes, that's exactly what I have noticed too. Going over the stop/delete/init/start cycle fixes the issues but sooner or later the same issue shows up

I also have this same issue, the second the vm restarts i get the issue so
boot2docker init
boot2docker up
everything works fine now
boot2docker restart
now it just throws this error with only way to fix is to delete vm
FATA[0000] An error occurred trying to connect: Get https://<IP_ADDRESS>:2376/v1.18/containers/json?all=1: x509: certificate is valid for <IP_ADDRESS>, <IP_ADDRESS>, not <IP_ADDRESS>

+1

I had a similar problem after doing boot2docker update to version 1.7.0.
I solved the issue by removing the server cert and key files and restarted /etc/init.d/docker.
It regenerated the server certificate with the address <IP_ADDRESS> now bound to the eth1 interface. It might be that the interface wasn't correctly brought up when the certificate has been regenerated during boot2docker update.
$ rm /var/lib/boot2docker/tls/server*.pem

Deleting boot2docker's ssh keys and re-initialization boot2docker worked, thanks @mmikulicic

I'm having the same problem after doing boot2docker update to version 1.7.0 also...
Performing the steps mentioned by @mmikulicic does not work; in fact, it breaks other things. (like boot2docker shellinit returning error in run: Error requesting socket: exit status 1)
The problem goes away if I destroy the image, and re-init; but comes back once I restart the vm (like 'restart' or 'start' and then 'stop).
Here is my specific message:
An error occurred trying to connect: Get https://<IP_ADDRESS>:2376/v1.19/containers/json: x509: certificate is valid for <IP_ADDRESS>, <IP_ADDRESS>, not <IP_ADDRESS>

@jmshelby following should help
boot2docker ssh
sudo rm /var/lib/boot2docker/tls/server*.pem
sudo /etc/init.d/docker restart
exit
boot2docker shellinit

@rooty0 as I explained, I already performed those steps (the ones mentioned by @mmikulicic), and they DO NOT WORK. After exiting from ssh'ing into boot2docker, and running boot2docker shellinit I get error in run: Error requesting socket: exit status 1
Even if that did work, it's something I would have to do every single time I restarted the b2d instance

+1

+1, in the same boat as @jmshelby

@jmshelby, when you ssh on your boot2docker instance and issue ifconfig, on which interface is the incriminated ip?
(i.e. if the message is  x509: certificate is valid for <IP_ADDRESS>, <IP_ADDRESS>, not <IP_ADDRESS> the ip I'm talking about would be <IP_ADDRESS>).
The /etc/init.d/docker file lists the interfaces whose ips it will add to the generated certificate:
: ${CERT_INTERFACES:='docker0 eth0 eth1'}

When the certificate is missing, it will regenerate and then reuse the same cert at subsequent boots.
You can see the ips contained in the existing certificate with:
$ sudo openssl x509 -text -in /var/lib/boot2docker/tls/server.pem | grep DNS
  DNS:boot2docker, IP Address:<IP_ADDRESS>, IP Address:<IP_ADDRESS>, IP Address:<IP_ADDRESS>, IP Address:<IP_ADDRESS>

If the certificate is ok, then perhaps you have a different problem than what I had.

@mmikulicic I ran the following after a reset via boot2docker delete/init/up
sudo openssl x509 -text -in /var/lib/boot2docker/tls/server.pem | grep DNS
DNS:boot2docker, IP Address:<IP_ADDRESS>, IP Address:<IP_ADDRESS>, IP Address:<IP_ADDRESS>

The output was correct, with all three IP addresses.
However after I run boot2docker restart and try again I get this:
sudo openssl x509 -text -in /var/lib/boot2docker/tls/server.pem
DNS:boot2docker, IP Address:<IP_ADDRESS>, IP Address:<IP_ADDRESS>

The third IP is gone!
When I exit out of boot2docker and run docker version
docker version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): darwin/amd64
An error occurred trying to connect: Get https://<IP_ADDRESS>:2376/v1.19/version: x509: certificate is valid for <IP_ADDRESS>, <IP_ADDRESS>, not <IP_ADDRESS>

I'm having the same issue as many above on a fresh install of boot2docker & docker I did just today (haven't used docker or boot2docker before on this computer).  I can reproduce the error a similar fashion as the others above.
1 boot2docker stop
2 boot2docker delete
3 boot2docker init
4 boot2docker start
Waiting for VM and Docker daemon to start...
.........................oooooooooooooooooo
Started.
Writing /Users/< user here >/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/< user here >/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/< user here >/.boot2docker/certs/boot2docker-vm/key.pem
To connect the Docker client to the Docker daemon, please set:
export DOCKER_HOST=tcp://<IP_ADDRESS>:2376
export DOCKER_CERT_PATH=/Users//.boot2docker/certs/boot2docker-vm
export DOCKER_TLS_VERIFY=1
5 $(boot2docker shellinit)
Writing /Users/<user here>/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/<user here>/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/<user here>/.boot2docker/certs/boot2docker-vm/key.pem

6 docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from hello-world
a8219747be10: Pull complete
91c95931e552: Already exists
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd18681cf5daeb82aab55838d
Status: Downloaded newer image for hello-world:latest
Hello from Docker.
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (Assuming it was not already locally available.)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

For more examples and ideas, visit:
 http://docs.docker.com/userguide/

7 boot2docker stop
8 boot2docker start
Waiting for VM and Docker daemon to start...
......................ooooo
Started.
Writing /Users/<user here>/.boot2docker/certs/boot2docker-vm/ca.pem
Writing /Users/<user here>/.boot2docker/certs/boot2docker-vm/cert.pem
Writing /Users/<user here>/.boot2docker/certs/boot2docker-vm/key.pem
Your environment variables are already set correctly.

9 docker run hello-world
An error occurred trying to connect: Post https://<IP_ADDRESS>:2376/v1.19/containers/create: x509: certificate is valid for <IP_ADDRESS>, <IP_ADDRESS>, not <IP_ADDRESS>

10 boot2docker ssh
11 docker@boot2docker:~$ sudo openssl x509 -text -in /var/lib/boot2docker/tls/server.pem | grep DNS
DNS:boot2docker, IP Address:<IP_ADDRESS>, IP Address:<IP_ADDRESS>
12 docker@boot2docker:~$ cat /etc/init.d/docker |grep -i cert_inte
: ${CERT_INTERFACES:='eth0 eth1'}
        for interface in ${CERT_INTERFACES}; do

13 docker@boot2docker:~$ ifconfig eth1|grep -i inet\ addr
inet addr:<IP_ADDRESS>  Bcast:<IP_ADDRESS>  Mask:<IP_ADDRESS>
Hence the ip should be being brought up but it's not...
I tried deleting the server*.pem files & restarting docker while inside the ssh session, exiting and then doing 'boot2docker shellinit. and got the same error in run: Error requesting socket: exit status 1
14 boot2docker -v up
Boot2Docker-cli version: v1.6.2
Git commit: cb2c3bc
2015/06/20 23:23:23 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2015/06/20 23:23:23 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
2015/06/20 23:23:23 executing: VBoxManage showvminfo boot2docker-vm --machinereadable
Waiting for VM and Docker daemon to start...
.Connecting to tcp://localhost:2022 (attempt #0)2015/06/20 23:23:23 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/<user here>/.ssh/id_boot2docker docker@localhost ip addr show dev eth1
SSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:83:97:50 brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe83:9750/64 scope link
       valid_lft forever preferred_lft forever

END SSH
VM Host-only IP address: <IP_ADDRESS>
Waiting for Docker daemon to start...
o2015/06/20 23:23:24 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/dharris/.ssh/id_boot2docker docker@localhost grep tcp:// /proc/$(cat /var/run/docker.pid)/cmdline
cat: can't open '/var/run/docker.pid': No such file or directory
Error requesting socket: exit status 1
o2015/06/20 23:23:24 executing: /usr/bin/ssh ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i /Users/dharris/.ssh/id_boot2docker docker@localhost grep tcp:// /proc/$(cat /var/run/docker.pid)/cmdline
cat: can't open '/var/run/docker.pid': No such file or directory
Error requesting socket: exit status 1

so something very weird is going on....

I decided to just move on to kitematic (which seems to be a wrapper for docker-machine which seems to be a wrapper for b2d) so far I haven't had the same issues (which is strange because it seems to be the same thing undercover).
Looks like kitematic might be what they're moving toward - just takes a bit of time to figure out how to work things without that pesky gui.

Something weird happening on boot2docker start
"/etc/init.d/docker status" returns "Docker daemon is not running" even though docker is running
"sudo /etc/init.d/docker restart" doesn't work because it uses the method above to check is process is running, ends up removing the pid file and all goes pear shape
"sudo /etc/init.d/docker stop && sudo /etc/init.d/docker start" works though
boot2docker ssh
sudo /etc/init.d/docker stop && sudo /etc/init.d/docker start
exit

@lrafagnin I can confirm your comments on the pid file and /etc/init.d/docker start, I ran into this yesterday while trying to debug

the /var/log/boot2docker.log shows the following output for me:
...

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet <IP_ADDRESS>/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default
    link/ether 26:08:5d:72:12:81 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:5a:72:f2 brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe5a:72f2/64 scope link tentative
       valid_lft forever preferred_lft forever
4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 08:00:27:c7:75:1b brd ff:ff:ff:ff:ff:ff
-------------------
Need TLS certs for boot2docker,<IP_ADDRESS>,<IP_ADDRESS>
-------------------

Looks like eth1 is DOWN during the initial boot, so that its ip cannot be used for the certs creation step. Would it be enough to make the docker init script be dependent on all interface initializations?

I made it work on my machine by adding the following to /var/lib/boot2docker/profile:
wait4eth1() {
        CNT=0
        until ip a show eth1 | grep -q UP
        do
                [ $((CNT++)) -gt 60 ] && break || sleep 1
        done
        sleep 1
}
wait4eth1

@gesellix Thank you! I've been running into this problem sporadically now, and I never had the time to dive into fixing it.
I've created a boot2docker image building repository to fix this issue (and to change the permissions of mounted volumes from your mac to your containers to 777 to allow containers to write to files and directories)
https://github.com/caleb/boot2docker-caleb

the fix also applies for boot2docker-windows.

@gesellix Only solution that worked for me too. Thanks!

Short-cut:
boot2docker ssh
sudo curl -o /var/lib/boot2docker/profile https://gist.githubusercontent.com/garthk/d5a17007c277aa5c76de/raw/3d09c77aae38b4f2809d504784965f5a16f2de4c/profile
sudo halt
boot2docker up

All credit to @fayep for PR #411 and @gesellix for pointing it out. Slower documentation in https://gist.github.com/garthk/d5a17007c277aa5c76de

Just upgraded to 1.7.0 and this problem surfaced.
The @garthk suggestion worked although the boot2docker up command hung. After forcing Virtualbox poweroff and starting up again all seemed to work fine. MacOS.

@garthk thanks for the fix. Works like a charm.

thanks @garthk for the convenient gist!
After applying the patch it was enough for me to restart the docker daemon with sudo /etc/init.d/docker restart (or from outside of the vm: boot2docker ssh sudo /etc/init.d/docker restart).

Hello everyone,
I come with the same problem and I have been able to solve with the solution propuse here:
https://github.com/docker/machine/issues/531
boot2docker ssh
sudo su
cd /var/lib/boot2docker/
touch profile
vim profile
wait4eth1() {
CNT=0
until ip a show eth1 | grep -q UP
do
[ $((CNT++)) -gt 60 ] && break || sleep 1
done
sleep 1
}
wait4eth1
save and close ( :wq )
exit
exit
boot2docker stop && boot2docker start && docker images
Should no longer complain with certs.
Best Regards.

I am seeing this same problem. I notice it, in particular, if I try to modify port mappings on the VM.

@warden's comment describes exactly what happened to me and how I fixed it https://github.com/boot2docker/boot2docker/issues/824#issuecomment-113993742
FWIW, I was trying to upgrade an old homebrew install. Decided to totally start fresh using the official installer, and still had these issues. (It looks like I may have had old files in ~/.boot2docker and a few other places...)

Actually I am experiencing a lot of weird issues after upgrade. I needed to re-init completely. Then when I was pulling a number of images simultaneously suddenly docker stopped responding and I got:
Unable to find image 'splitbrain/phpfarm:latest' locally
Pulling repository splitbrain/phpfarm
481879dcb8b8: Pulling dependent layers
511136ea3c5a: Download complete
5a7d9470be44: Downloading 10.81 MB
unexpected EOF

docker ps then complained again:
An error occurred trying to connect: Get https://<IP_ADDRESS>:2376/v1.19/containers/json: x509: certificate is valid for <IP_ADDRESS>, <IP_ADDRESS>, not <IP_ADDRESS>

I can confirm that (for now), without the patch, this fixes things:
boot2docker ssh sudo /etc/init.d/docker restart

@warden does the last command fix problems even for reboots? The wait4eth1 func in https://github.com/boot2docker/boot2docker/issues/824#issuecomment-113904164 helped me to not have to repeat the docker daemon restart everytime.

Well, probably not, because this is fixing it ad hoc. But I prefer to start boot2docker quicker (and I rarely actually stop it at all) and restarting, than waiting ages for it to get up.

+1 the fix also worked for me

+1 for fix working

+1 worked for me too

As much as I hope @warden's fix would help, it also failed along with the long list of other suggestions here. Aside from destroying the VM and reinitializing it from scratch, I still can't get around this issue.

@jakirkham can you share the output of your boot2docker log? Get it like this:
boot2docker ssh cat /var/log/boot2docker.log

I'm experiencing the same issue. None of these workaround are working for me.
$ boot2docker ssh cat /var/log/boot2docker.log
net.ipv4.ip_forward = 1
sysctl: cannot stat /proc/sys/net/ipv6/conf/all/forwarding: No such file or directory
sysctl: setting key "cannot stat %s": No such file or directory
sysctl: "cannot stat %s" is an unknown key
sysctl: setting key "cannot stat %s": No such file or directory
Segmentation fault
automount ...
/dev/sda1
/dev/sda1
mount p:sda1 ...
umount: can't forcibly umount /var/lib/docker: No such file or directory
total 24
drwx------    2 root     root         16384 Jun 23 07:45 lost+found
drwxrwxrwt    4 root     staff         4096 Jun 23 07:47 tmp
drwxr-xr-x    3 root     root          4096 Jun 23 07:45 var
automount over.
installing *.pem
Setting hostname to boot2docker Done.
mv: can't rename '/usr/local/etc/ssh/ssh_config.example': No such file or directory
-------------------
Tue Jun 23 07:47:17 UTC 2015
Tue Jun 23 07:47:22 UTC 2015
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet <IP_ADDRESS>/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default
    link/ether ca:84:49:67:21:60 brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:7e:ed:72 brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe7e:ed72/64 scope link
       valid_lft forever preferred_lft forever
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:e5:70:da brd ff:ff:ff:ff:ff:ff
    inet <IP_ADDRESS>/24 brd <IP_ADDRESS> scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fee5:70da/64 scope link
       valid_lft forever preferred_lft forever
-------------------
Need TLS certs for boot2docker,<IP_ADDRESS>,<IP_ADDRESS>,<IP_ADDRESS>
-------------------

The root cause of this issue for me was that boot2docker ip now returns <IP_ADDRESS> instead of <IP_ADDRESS> and I had the latter hard coded in a lot of places in my environment since it's basically stayed the same for months. Hope this helps others!

@warden's fix works for me.

@gesellix, sure, I have put it in this gist ( https://gist.github.com/jakirkham/5b4ddb833d737cf29299 ).

came across this after doing an upgrade 1.5 => 1.7. @garthk's  gist worked for me :)
just wanted to note that manually restarting does NOT seem to be a proper fix for this issue. it is really annoying :S

I am beginning to think these two issues may be related ( boot2docker/boot2docker#945 ).

Got the same problem as well after doing an upgrade to 1.7

@jakirkham @m0ppers the line at the end of the log should contain the public boot2docker ip <IP_ADDRESS>. If that's not the case, there are two options:

re-run the docker daemon init script: boot2docker ssh sudo /etc/init.d/docker restart, which should add the ip address of the eth1 interface to the list of secured interfaces, and ultimately generate matching certificates
add the delay script from https://github.com/boot2docker/boot2docker/issues/824#issuecomment-113904164 and restart the docker daemon, which should fix the problem until you reset/delete your boot2docker VM. @garthk created a little gist for your convenience: https://github.com/boot2docker/boot2docker/issues/824#issuecomment-113970908

So, the following line from boot2docker ssh cat /var/log/boot2docker.log is wrong:
Need TLS certs for boot2docker,<IP_ADDRESS>,<IP_ADDRESS>

it should look like:
Need TLS certs for boot2docker,<IP_ADDRESS>,<IP_ADDRESS>,<IP_ADDRESS>

If you got another ip adress like <IP_ADDRESS>, you have a different problem, which won't be fixed with the delay script mentioned above.

@gesellix, I have tried route 2 previously and have had no success. Regardless, I have to agree with @m0ppers, neither of these is a "fix" at best they are workarounds.

@jakirkham you're right, both routes aren't a final solution. I actually asked in #411 if there's a more stable and definitive way to make the docker init dependent on all interfaces being UP.

Same issue here after the upgrade :(

Thanks @gesellix.

Thanks @warden
    boot2docker ssh sudo /etc/init.d/docker restart

I got an error:
sh: syntax error:  unexpected "("
error in run: exit status 2

Ok, so here is a gist containing the log when restarting won't work at all ( https://gist.github.com/jakirkham/de8a3d515577c776255d ). This happened to me yesterday.

@jakirkham I would guess that a /etc/init.d/docker restart should help - so not the complete boot2docker vm. The other option would be to add the delay script.
Your log shows that eth1 doesn't have an ip, which would be a precondition to add the relevant certificates.

@gesellix, earlier I was connected to Ethernet (with WiFi off) and I destroyed and reinitialized the VM. Then I switched to WiFi (disconnected Ethernet) and was able to use my container that was up and running for a bit. Then I stopped the container and tried to start a new one hence where this issue comes into play.
The fact that it show eth1 as unassigned doesn't surprise me unless I don't understand something about how their VM is configured, which may very well be the case. I would think that wlan0 should show up, but if they are letting it masquerade as Ethernet, then this may explain it.

@meenarc, it looks like this problem also effects Windows, as claimed by @joebalt, do you mind updating the title to reflect that this no longer just an OS X issue?

+1 same issue

@jakirkham I guess the boot2docker vm isn't aware of your hardware connections. As your log output shows there's no wlan interface found.
You can check the current interfaces (and their ips) with boot2docker ssh ip addr show.

@hbto
Fix worked for me on Windows with the latest Docker version 1.7.0.

Hello everyone,

I come with the same problem and I have been able to solve with the solution propuse here:

docker/machine#531

boot2docker ssh
sudo su
cd /var/lib/boot2docker/
touch profile

vim profile

wait4eth1() {
CNT=0
until ip a show eth1 | grep -q UP
do
[ $((CNT++)) -gt 60 ] && break || sleep 1
done
sleep 1
}
wait4eth1

save and close ( :wq )

exit
exit

boot2docker stop && boot2docker start && docker images
Should no longer complain with certs.

Best Regards.

This profile workaround worked for me on Windows 7 x64:
=>docker -v
Docker version 1.7.0, build 0baf609

Thanks @gesellix Was just getting started with docker on mac for the first time and was finding this whole issue a bummer. Thanks to your inputs here:
https://github.com/boot2docker/boot2docker/issues/824#issuecomment-113904164
I am back in business :+1:

+1 my outstanding issue now.  Now, I can only get away with this error by docker delete and init again.

@gesellix I am using max yosemite, but I don't have this path:  /var/lib/boot2docker/profile

@timhtheos
profile is not  a folder. Is actually a file. Maybe I'm reading your message wrong, and your problem is that you have no ``var`` orlib` or boot2docker  folders.
But if you think that profile is a folder, well you are on the wrong path.
The path is /var/lib/boot2docker and the file to edit is profile.
Hope this helps.

@timhtheos you need to boot2docker ssh first.

@cristian-smocot @gesellix Yep, figured that out through @garthk's comment.  Thanks. Testing now.

@gesellix running boot2docker up is taking very long, until now, it's still running.  Is this normal or what, based on your experience after what you did what you suggested?

@timhtheos I didn't measure the boot time before and after the additional delay script, but I also didn't notice any extra time. So I guess you have another issue.

@timhtheos the first boot after the fix has a good chance of not completing. Power off the VM from VBox, then try again.

Just FYI, we have also found that downgrading boot2docker to 1.6.2 will  take care of the issue and the issue has never resurfaced so far after the downgrade.

I can confirm, docker 1.6 works great. Docker 1.7 is unusable on OS X. It works well until you need to shut down boot2docker. Any eta on when this will be fixed? I see the suggestions above, but those are really a temporary fix, and doesn't actually fix the underlying problem here.

@gesellix fixed work +1

Workaround/Fix mentioned by @hbto worked for me.
https://github.com/boot2docker/boot2docker/issues/824#issuecomment-114173742

Same with fresh install first time.

note that restarting the docker daemon manually solves it, as that triggers a cert re-generation
boot2docker ssh sudo /etc/init.d/docker restart
please tell me if this doesn't work for you, as its the basis for the fix i'm pondering (essentially, i think the 1.7 dhcp ip address setting is happening slightly slower than before)

@SvenDowideit Sorry, this does not always work for me. Old description of problem when I ran into it with log attached in gist. Please let me know if you have any questions.

Ok, so here is a gist containing the log when restarting, by which I mean sudo /etc/init.d/docker restart, won't work at all ( https://gist.github.com/jakirkham/de8a3d515577c776255d ). This happened to me yesterday.

@jakirkham can you check boot2docker ssh ip addr show before the docker restart? The output should contain the interface eth1, which should be declared as UP and have an ip address.
The expectation to let the docker restart work is an initialized interface eth1 (or eth0).

@SvenDowideit is #411 related to the eth1 dhcp issue?

@gesellix, here is a pretty comprehensive log of how boot2docker ssh ip addr show varies ( https://gist.github.com/jakirkham/8b42f6a9d97c6aa43d2e ). At the very beginning, I have just switched networks, which is how this problem normally affects me. Normally, I have to reboot boot2docker because everything is immediately messed up just by switching networks. Then I try to reboot to see if that will help. At that point, I have tried the patch you added, which goes super slow and either never finishes or errors. Finally, I'm forced to destroy the VM and start from scratch. I have included all of these steps with info from boot2docker ssh ip addr show as to what changed at each point.

+1 only works if I delete && init. Fresh install.

@andrecp I just had the same problem.  Everything worked.

So, at @SvenDowideit has supplied a PR above, which appears to work at least in a few cases. To make it easier for people to try out, I have placed a copy of the ISO built from this PR in Dropbox ( https://www.dropbox.com/s/gsjtioqydni9l7r/boot2docker.iso?dl=0 ).
On Mac, you will want to run the following.
$ curl -L https://www.dropbox.com/s/gsjtioqydni9l7r/boot2docker.iso?dl=0 > ~/.boot2docker/boot2docker.iso
$ openssl sha1 ~/.boot2docker/boot2docker.iso   # should be c10470db7a5f90b0fa8ec7e99d8145c41acbc5ad
$ boot2docker destroy && boot2docker init && boot2docker up && eval $(boot2docker shellinit)

:+1:

note that restarting the docker daemon manually solves it, as that triggers a cert re-generation
boot2docker ssh sudo /etc/init.d/docker restart

please tell me if this doesn't work for you, as its the basis for the fix i'm pondering (essentially, i think the 1.7 dhcp ip address setting is happening slightly slower than before)

@SvenDowideit, this did work for me, in my case.

Restart worked for me. Thanks
On Tue, Jun 30, 2015 at 1:17 AM Chris Lasher<EMAIL_ADDRESS>wrote:

note that restarting the docker daemon manually solves it, as that
triggers a cert re-generation
boot2docker ssh sudo /etc/init.d/docker restart
please tell me if this doesn't work for you, as its the basis for the fix
i'm pondering (essentially, i think the 1.7 dhcp ip address setting is
happening slightly slower than before)
@SvenDowideit https://github.com/SvenDowideit, this did work for me, in
my case.
—
Reply to this email directly or view it on GitHub
https://github.com/boot2docker/boot2docker/issues/824#issuecomment-116814876
.

Has any work been done towards this issue?

@liamdawson see pr #960 This issue has already been fixed and merged, just waiting for release of 1.7.1.

@liamdawson Feel free to try it. See notes here if you don't feel like building it ( https://github.com/boot2docker/boot2docker/issues/824#issuecomment-116759440 ).

@jakirkham Your three-step fix worked great for me.  I'm looking forward to 1.7.1, as this issue is affecting us quite a bit.

@charford @jakirkham Thanks for the update, just thought this ticket would have been closed if something was ready. Otherwise, awesome!

@garthk, thanks for the solution.  Worked like a charm!

SvenDowideit's solution worked for me:
boot2docker ssh sudo /etc/init.d/docker restart

SvenDowiteit's solution worked for me:
boot2docker ssh sudo /etc/init.d/docker restart

Solution stated by @garthk WORKS! Thanks again.

boot2docker ssh sudo /etc/init.d/docker restart
Worked for me.

@phact's solution temporarily worked.

+1

Can anyone who's able to reproduce this test with v1.7.1-rc3 (https://github.com/tianon/boot2docker/releases/tag/v1.7.1-rc3) and verify that #960 fixed it?

Thanks to @nathanleclaire, we've verified that #960 is the fix.  Let's build us an official 1.7.1 release and finally put this to bed! :+1:

Finally this is being fixed. I verified this fix two weeks ago in the original PR #960. It's very disappointing to see it has taken over two weeks for this to be released. Considering how frequent this bug was encountered, I am surprised it was not caught before the release.

Really sorry for any inconvenience encountered in the meantime, everyone.  In our excitement to migrate to Docker Machine, unfortunately this one slipped through the cracks.

我是这样解决问题的：
boot2docker ssh sudo /etc/init.d/docker restart
非常感谢dennybritz

@liusongsen, just upgrade. The fix has been included in version 1.7.1.

@jakirkham Fix version work for me. Thank.

I've got version 1.7.1 and the issue remains :( I try the wait4eth1() and nothing :S

@mariowise, My OS X version 10.10.4 and fix working with out any issue. may be you need to update your OS X version.
Kernel Version: 4.0.7-boot2docker
Operating System: Boot2Docker 1.7.1 (TCL 6.3); master : c202798 - Wed Jul 15 00:16:02 UTC 2015

@mariowise, are you sure the VM is actually using this version. If not, could you try the following and see if it makes any difference?
boot2docker destory && boot2docker init && boot2docker up

Also, you may find that you need to reboot the VM when switching networks. That is unfortunately a different unresolved problem ( https://github.com/boot2docker/boot2docker/issues/945 ).

Fix in 1.7.1 worked for me.

Well it was important to get this to work in OSX 10.9, I reboot the Mac, reinstall and then use the this, and then it worked fine.
Thanks! (I'm on OSX 10.9.5 + boot2docker 1.7.1)

@Laxman-SM, I have the same specs as @mariowise and the update works for me. I think something else is going on.

1.7.1 works perfectly for me.


Elementary Number Theory

A suggested source is Silverman's "A friendly introduction to number theory" ,which is probably in Imperial's library. We could also work on digitising Prof Gee's M3P14 example sheets. Note: even if you're only a first or second year -- M3P14 doesn't need much background, it mostly develops basic properties of the integers without using too much machinery, so probably most people can contribute.

Could someone point me to where I can find Prof Gee's M3P14 example sheets?
Or maybe put them in this repository?
Thanks

We now have gcd's of integers -- M3P14 sheet 1 is mostly formalised! We need -- sums over general sets (e.g. sums over divisors of n of ...). finset.sum does sum over a finite set -- maybe this helps for this situation?

This stuff seems to be going really well. What helps is that there is a very solid API for naturals an integers. A lofty goal here would be to prove the law of quadratic reciprocity. Several people (@gml16  @ClaraList @sj2816 and others too) have started formalising questions and solutions on the example sheets -- my only worry is that we'll get different people working on the same thing.


HIPP-1764: Fix yaml string bug

Fix for some unexpected behaviour. The yaml parser will wrap a yaml implicit string with quotes, resulting in an incorrect string being subject to the length check. It does not do this with integer values.

Need to rethink this.


feat: add @nodevu/fetchindex

this PR abstracts the util/prod/version.js file from @nodevu/core into a new package, @nodevu/fetchindex. This is the result of a discussion with @ljharb and @wesleytodd at the Node.js Collaborator Summit in Dublin, Ireland.

worth noting, this API will probably immediately change as I spin out optionsParser next

The package doesn't seem to be published, ftr

Sorry this got lost in my notifications, but consider this an after merge 👍


K README and INSTALL should mention bash version requirements

We consistently have MacOS users who have an outdated version of bash, and need to upgrade to use the functionality of many of our runner scripts. https://www.shell-tips.com/mac/upgrade-bash/
We should mention this in the installation/build instructions.

with K, we have endeavored to ensure that we don't use any of the newer features of bash, so that users don't have to modify their development environment like this just to get it to work. You may want to consider identifying whether or not there's a way to modify the runner scripts so you don't have this type of issue.


fix: editorconfig settings for shell files

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


How to query by primary key

For example, hasura has authors and authors_by_pk.
So authorCollection is the equivalent to the former, but how do we get just one of an item? We can use nodeID, and the node interface with inline fragments, but it feels hacky and wrong.

We may introduce some kind of <query by unique key>: Record in the future, but for now the options are to operate over the and return a RecordConnection type, or use the node interface


make notification via awful

Hey,
is there some chance to generate custom notification via awful?
I am creating my own sh script for toggling keyboard layouts like this
#!/bin/bash

actual_layout=$(setxkbmap -query | grep layout)

if [[ $actual_layout == *"us"* ]]; then
        setxkbmap -layout "cz(qwerty)"
else
        setxkbmap -layout "us"
fi

xmodmap $HOME/.Xmodmap

and rebind the keys/global.lua shortcut mod+space, like this
awful.key(
    {modkey},
    'space',
    function()
      -- _G.screen.primary.left_panel:toggle(true)
      awful.spawn('nextkblayout.sh')
      -- HERE I WANT SHOW NOTIFICATION WITH CUSTOM MESSAGE
    end,
    {description = 'show main menu', group = 'awesome'}
  ),

is it possible?

Ok I am found the naught solution like this
awful.spawn.easy_async_with_shell('nextkblayout', function(out)
        naughty.notify({
          title = 'Keyboard layout switched',
          text = out
        })
      end)

but the notify appears after few seconds, not at the same moment


Onboarding UI

As a
user
I want to
to be onboarded with what the heck is this app, what does this do
To
be hooked asfp

Acceptance Criteria

[x] replaced temporary onboarding UI in the app

:tada: This issue has been resolved in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Exception when trying to get Boolean when all values are null.

https://github.com/audienceproject/spark-dynamodb/blob/485b44991869a2f28755ea6fe8ae54de518cfed4/src/main/scala/com/audienceproject/spark/dynamodb/datasource/TypeConversion.scala#L89
In TypeConversion, nullableGet method, catch is not capturing IncompatibleTypeException which is thrown when column has only null values. I think it should be included inside the catch and map to a null value.

Hi,
We’ll take a look after New Year’s.

I wrote this test to reproduce the problem.
`import com.amazonaws.services.dynamodbv2.document.Item
import com.amazonaws.services.dynamodbv2.model.{
AttributeDefinition,
CreateTableRequest,
KeySchemaElement,
ProvisionedThroughput
}
import com.audienceproject.spark.dynamodb.implicits._
class TestNullBoolean extends AbstractInMemoryTest {
test("Test Null") {
dynamoDB.createTable(
new CreateTableRequest()
.withTableName("TestNullBoolean")
.withAttributeDefinitions(new AttributeDefinition("Pk", "S"))
.withKeySchema(new KeySchemaElement("Pk", "HASH"))
.withProvisionedThroughput(new ProvisionedThroughput(5L, 5L))
)
val table = dynamoDB.getTable("TestNullBoolean")

for ((_pk, _type, _value) <- Seq(
       ("id1", "type1", true),
       ("id2", "type2", null)
     )) {
  if (_type != "type2") {
    table.putItem(
      new Item()
        .withString("Pk", _pk)
        .withString("Type", _type)
        .withBoolean("Value", _value.asInstanceOf[Boolean])
    )
  } else {
    table.putItem(
      new Item()
        .withString("Pk", _pk)
        .withString("Type", _type)
        .withNull("Value")
    )
  }
}

val df = spark.read.dynamodbAs[BooleanClass]("TestNullBoolean")

import spark.implicits._
df.where($"Type" === "type2").show()
client.deleteTable("TestNullBoolean")

}
}
`

Hi @juanyunism, I've shamelessly taken the code and commit it. It works fine. Do you need a new release now, or can you wait until we get more stuff in?

Thank you for the quick response :).
Don't worry, release when you get more stuff in. Can you provide me the branch with the fix so I can download and build it to try it locally?
Thanks in advance.

Nevermind, just found it in master 😃

lazy val root = (project in file(".")).dependsOn(depProject) lazy val depProject = ProjectRef(   uri("git://github.com/audienceproject/spark-dynamodb.git#master"),   "spark-dynamodb" )

Hi @cosmincatalin, is there any possibility you could cut a release with this fix included?

Sure, I’ll make a release before this weekend.

Released in 1.0.3

Thank you @cosmincatalin!


[Question] Changelog

Hi,
Just wondering if there is way to, somehow, add "Changelog" section somwhere? Or is there a suggestion/example? I guess this would work at the bottom of the page but the question is, would there be any way for adding a link on the left hand side where the menu is?
Thanks

Use markdown within the spec. This provides you the option of adding section headings on the left menu using the info-description-headings-in-navbar attribute

here is an example  https://mrin9.github.io/RapiDoc/examples/markdown-headings.html
and the spec for that is https://mrin9.github.io/RapiDoc/specs/markdown-headings.yaml

Thanks for this @mb1511. There are two problems with that. First of all it is a bit jumpy. If you school up or down slowly, it jumps between the items. Second thing is, I am unable to add
 elements for footer. If I do, they appear on top of the page.

            This is an external html content    <--- this appears in the footer which is fine

line 1

line 2

    <--- this appears on top of the page

Never mind the footer issue as I managed to solve with duplicating the slot but the jumping issue persists.

Thanks for the update

I would prefer markdown over slots as they are native to open-api specs and get the first-class support from rapidoc
slots should be used if you like to add some extended styles thats not possible with just markdown


Update KB ref ticket #1363591

Update KB deploy-microsoft-windows-2012-active-directory-domain-services to reflect current Platform GUI and replace file "deploy-active-directory-2.png" with attached.

I was unable to replace screenshot file "deploy-active-directory-2.png" in the fork, therefore attaching

you need to include the file in your pull request per normal process.


[cherry pick] add dimenstion for arm packaging

Add dimention for arm packaging
cherry picks (#122770) since dart internal has a different logic to parse .ci.yaml targets

[reopen] yes we want cp into beta

[reopen] yes we want cp into beta

Why do you want to cherrypick into beta? Shouldn't this go through the release candidate branch first?

Question about why this the merge base for this PR isn't an RC branch

Oh good point! will open an issue to cp into release branch instead. Thank you Christopher!
For my learning purposes, will we be keep cp-ing this into release branches, until the release branch catches up with the current master? (since only the current master include this change)


Accessories not being exposed: "Hue Bridge: 0 lights"

Issue

Hi there, the plugin doesn't seem to be exposing any of my lights.

"Lights" is enabled under the plugin config "Resource Types."
I have four bulbs. The debug log shows that four /lights/X endpoints are being exposed, but then goes on to say Hue Bridge: 0 lights.

Log Messages

[23/10/2024, 01:25:25] [Hue] upnp: listening on upnp
[23/10/2024, 01:25:25] [Hue] meethue.com: request 1: GET /
[23/10/2024, 01:25:25] [Hue] meethue.com: request 1: GET /
[23/10/2024, 01:25:25] [Hue] meethue.com: request 1: http status 429 Too Many Requests
[23/10/2024, 01:25:27] [Hue] bonjour: found ECB5FAFFFE8CE98B at 10.***.***.55
[23/10/2024, 01:25:27] [Hue] 10.***.***.55: request 1: GET /config
[23/10/2024, 01:25:27] [Hue] 10.***.***.55: request 1: 200 OK
[23/10/2024, 01:25:30] [Hue] upnp: search done
[23/10/2024, 01:25:30] [Hue] upnp: search done
[23/10/2024, 01:25:30] [Hue] Hue Bridge: Signify Netherlands B.V. BSB002 bridge v1967054010, api v1.67.0
[23/10/2024, 01:25:30] [Hue] Hue Bridge: request 1: GET /
[23/10/2024, 01:25:30] [Hue] Hue Bridge: request 1: 200 OK
[23/10/2024, 01:25:30] [Hue] Hue Bridge: request 2: GET /groups/0
[23/10/2024, 01:25:30] [Hue] Hue Bridge: request 2: 200 OK
[23/10/2024, 01:25:30] [Hue] Hue Bridge: ECB5FAFFFE8CE98B: Signify Netherlands B.V. BSB002 bridge "Hue Bridge"
[23/10/2024, 01:25:30] [Hue] Hue Bridge: /lights/1: exposed by bridge {"state":{"on":true,"bri":254,"hue":5225,"sat":187,"effect":"none","xy":[0.5311,0.3852],"ct":500,"alert":"select","colormode":"xy","mode":"homeautomation","reachable":true},"swupdate":{"state":"noupdates","lastinstall":"2024-10-23T08:18:06"},"type":"Extended color light","name":"Ceiling 1","modelid":"LCA003","manufacturername":"Signify Netherlands B.V.","productname":"Hue color lamp","capabilities":{"certified":true,"control":{"mindimlevel":200,"maxlumen":800,"colorgamuttype":"C","colorgamut":[[0.6915,0.3083],[0.17,0.7],[0.1532,0.0475]],"ct":{"min":153,"max":500}},"streaming":{"renderer":true,"proxy":true}},"config":{"archetype":"ceilinground","function":"mixed","direction":"omnidirectional","startup":{"mode":"safety","configured":true}},"uniqueid":"00:17:88:01:0b:6d:4a:7e-0b","swversion":"1.122.2","swconfigid":"A7A92A2E","productid":"Philips-LCA003-1-A19ECLv6"}
[23/10/2024, 01:25:30] [Hue] Hue Bridge: /lights/2: exposed by bridge {"state":{"on":true,"bri":254,"hue":61495,"sat":232,"effect":"none","xy":[0.5568,0.262],"ct":500,"alert":"select","colormode":"xy","mode":"homeautomation","reachable":true},"swupdate":{"state":"noupdates","lastinstall":"2024-10-23T08:20:10"},"type":"Extended color light","name":"Ceiling 2","modelid":"LCA003","manufacturername":"Signify Netherlands B.V.","productname":"Hue color lamp","capabilities":{"certified":true,"control":{"mindimlevel":200,"maxlumen":800,"colorgamuttype":"C","colorgamut":[[0.6915,0.3083],[0.17,0.7],[0.1532,0.0475]],"ct":{"min":153,"max":500}},"streaming":{"renderer":true,"proxy":true}},"config":{"archetype":"ceilinground","function":"mixed","direction":"omnidirectional","startup":{"mode":"safety","configured":true}},"uniqueid":"00:17:88:01:09:4e:e1:ca-0b","swversion":"1.122.2","swconfigid":"A7A92A2E","productid":"Philips-LCA003-1-A19ECLv6"}
[23/10/2024, 01:25:30] [Hue] Hue Bridge: /lights/3: exposed by bridge {"state":{"on":true,"bri":254,"hue":209,"sat":202,"effect":"none","xy":[0.6244,0.3248],"ct":500,"alert":"select","colormode":"xy","mode":"homeautomation","reachable":true},"swupdate":{"state":"transferring","lastinstall":"2024-10-23T08:04:34"},"type":"Extended color light","name":"Tall Lamp","modelid":"LCA003","manufacturername":"Signify Netherlands B.V.","productname":"Hue color lamp","capabilities":{"certified":true,"control":{"mindimlevel":200,"maxlumen":800,"colorgamuttype":"C","colorgamut":[[0.6915,0.3083],[0.17,0.7],[0.1532,0.0475]],"ct":{"min":153,"max":500}},"streaming":{"renderer":true,"proxy":true}},"config":{"archetype":"floorshade","function":"mixed","direction":"omnidirectional","startup":{"mode":"safety","configured":true}},"uniqueid":"00:17:88:01:09:52:68:b8-0b","swversion":"1.116.5","swconfigid":"A7A92A2E","productid":"Philips-LCA003-1-A19ECLv6"}
[23/10/2024, 01:25:30] [Hue] Hue Bridge: /lights/4: exposed by bridge {"state":{"on":true,"bri":254,"hue":440,"sat":254,"effect":"none","xy":[0.6825,0.315],"ct":500,"alert":"select","colormode":"xy","mode":"homeautomation","reachable":true},"swupdate":{"state":"noupdates","lastinstall":"2024-10-23T08:14:35"},"type":"Extended color light","name":"Corner","modelid":"LCA003","manufacturername":"Signify Netherlands B.V.","productname":"Hue color lamp","capabilities":{"certified":true,"control":{"mindimlevel":200,"maxlumen":800,"colorgamuttype":"C","colorgamut":[[0.6915,0.3083],[0.17,0.7],[0.1532,0.0475]],"ct":{"min":153,"max":500}},"streaming":{"renderer":true,"proxy":true}},"config":{"archetype":"flexiblelamp","function":"mixed","direction":"omnidirectional","startup":{"mode":"safety","configured":true}},"uniqueid":"00:17:88:01:09:ce:9d:a9-0b","swversion":"1.122.2","swconfigid":"A7A92A2E","productid":"Philips-LCA003-1-A19ECLv6"}
[23/10/2024, 01:25:30] [Hue] Hue Bridge: 0 sensors
[23/10/2024, 01:25:30] [Hue] Hue Bridge: 0 lights
[23/10/2024, 01:25:30] [Hue] Hue Bridge: 0 schedules
[23/10/2024, 01:25:30] [Hue] Hue Bridge: 0 rules
[23/10/2024, 01:25:30] [Hue] Hue Bridge: 0 groups
[23/10/2024, 01:25:30] [Hue] Hue Bridge: event stream request 1: GET /resource/button
[23/10/2024, 01:25:30] [Hue] Hue Bridge: event stream request 1: 200 OK
[23/10/2024, 01:25:30] [Hue] Hue Bridge: 1 accessories

Debug Files

homebridge-hue.json

The log says the lights are already exposed natively by the Hue bridge.  And you told Homebridge Hue you would use that feature by setting nativeHomeKitLights.

Erik, thank you so much for your prompt response. Originally I had not had them natively exposed, so I'm not sure why it wasn't working. But now I have disabled nativeHomeKitLights and it's working perfectly. Resolved, thanks again!!!


Window position conflicts with Breaktime Module.

Love the module, I also use the Breaktime module which adds a Breaktime option to the players bar. This makes the player bar larger. With your window in a fixed position relative to the height of the unmodified player window, it now obscures part of your modules window.
Any luck getting a window position option? Thanks

.

I was able to disable breaktime module then move your module then re-enable so, no worries mate. Nevermind. Thanks for a gretat Mod!

Glad you sorted it out. As noted over in #137, I'm working on a way to nudge the SmallTime window away from Players for cases like this, just isn't done yet.

Thanks for the response.
On Thu, Jul 28, 2022, 11:39 AM John Weston @.***> wrote:

Glad you sorted it out. As noted over in #137
https://github.com/unsoluble/smalltime/issues/137, I'm working on a way
to nudge the SmallTime window away from Players for cases like this, just
isn't done yet.
—
Reply to this email directly, view it on GitHub
https://github.com/unsoluble/smalltime/issues/139#issuecomment-1198322655,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AXPJF3PMHHDP3BF5YGHQAGLVWKSTHANCNFSM545D7GMA
.
You are receiving this because you modified the open/close state.Message
ID: @.***>

on 1.15.4, I believe this isn't the intended behavior?

Mmmm depends? If the SmallTime window was pinned to the top of the Players list, then no it shouldn't do that (but I can't reproduce here). If it was manually placed, it could happen.

Mmmm depends? If the SmallTime window was pinned to the top of the Players list, then no it shouldn't do that (but I can't reproduce here). If it was manually placed, it could happen.

Was snapped to the top of the player list, had all players exit, snapped it to top again, the moment they started loading in (as you can see, I have 7 of them) it got buried again.

if I snap it to the top while they're all loaded in, I also get the drag bar buried under the player list:

Yeah I can't reproduce that here no matter what I try. Maybe try a Control-F5, something might be cached?

I'll fiddle with it more after session... very strange...

You on Foundry v9 by any chance?

You on Foundry v9 by any chance?

Sure am.

Got it. Sorry, I haven't been taking the time to test everything thoroughly in v9 on new builds; all my attention's been on v10 lately. Should be working better in 1.15.5 (out in a sec).

No worries, appreciate your work! (and your GitHub avatar, showing your disappointment in yourself whenever you commit)


Fix #579 (piral-ng destroying all modules instead of only the intended one)

Prerequisites
Please make sure you can check the following boxes:

[x] I have read the CONTRIBUTING document
[x] My code follows the code style of this project
[x] All new and existing tests passed

Type(s) of Changes
Contribution Type
What types of changes does your code introduce? Put an x in all the boxes that apply:

[x] Bug fix (non-breaking change which fixes an issue, please reference the issue id)
[ ] New feature (non-breaking change which adds functionality, make sure to open an associated issue first)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes

Description
Implements the second solution as outlined in #579.
It makes use of some Angular internals similarly to how Angular does for SSR: https://github.com/angular/angular/blob/main/packages/platform-server/src/server.ts
Remarks
My Angular knowledge is limited, but I tried my best at analyzing the issue and this solution.
Let me know if I've missed anything.
While relying on Angular internals is hacky, I don't really think there's a better fix for this issue.
Thanks for the great work on this framework :D

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


graph.addEdgeDefinition fails to add with no error with multiple from: properties

This could be an issue on arangos api side, however when using the arango web ui it is possible to add a graph with multiple "from" and "to" properties.
When attempting this via the node driver, there is no error thrown but any definitions which have more than one "from" property do not appear in the graph.

Could you provide an example? You should be able to use multiple "from" properties by passing an array of values:
graph.addEdgeDefinition({
  collection: 'foo',
  from: ['a', 'b'],
  to: ['c', 'd']
});

Also note that there can be only one edge definition per edge collection even if the collection is used in multiple graphs: https://docs.arangodb.com/HttpGharial/Management.html

It looks like the issue may not be related to multiple from properties and more related to the use of the async module adding multiple edge definitions to a single graph.
I have recently faced a similar issue with a single from edge and switching from async.each to async.eachSeries seems to make the the graph creation consistently add all edge definitions.

The problem with async.each vs async.eachSeries is likely that each performs the queries in parallel whereas eachSeries performs them (as the name indicates) in series. Normally this shouldn't be a problem but if you can replicate this problem outside the JS driver (e.g. by simply using async.each with the raw HTTP API, such as using request) you should probably file an issue with ArangoDB itself.


0.13 [fix] Broken transition tests

This PR fixes the broken transition tests associated with the 0.13-compat branch. Basically this was wrong.

Closed in favor of https://github.com/rackt/react-router/pull/948


chore: remove usage of module autorest/azure

Reason for Change:

This PR removes the usage of module autorest/azure:

It uses its own Environment structs in pkg/api/types.go.
It removes the usage of helper method EnvironmentFromName.

Issue Fixed:

Credit Where Due:
Does this change contain code from or inspired by another project?

[ ] No
[ ] Yes

If "Yes," did you notify that project's maintainers and provide attribution?

[ ] No
[ ] Yes

Requirements:

[x] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Notes:

Validated with obp pr-e2e pipeline.


proposal: net/http: NewRequest should take url.URL as target

What version of Go are you using (go version)?

$ go version
go version go1.14 linux/amd64

Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/slinkydeveloper/.cache/go-build"
GOENV="/home/slinkydeveloper/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/slinkydeveloper/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/lib/golang"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build012661714=/tmp/go-build -gno-record-gcc-switches"

What did you do?

NewRequestWithContext and NewRequest take string as target parameter. Then the target is internally parsed to url.URL using url.Parse().
Because a lot of applications out there pre-parse the url for several reasons, this API tends to have a negative impact to the applications. Some examples when this parsing is useless:

the url provided by another library
the target of the requests is always the same
the target is always an host with the same http scheme, so building the url manually is faster

In my personal opinion is also more "type safe" to require an url for the target parameter.
What did you expect to see?
A way to build a http.Request with a context without the overhead of stringifying the url and parsing it back.
Trying to work around the issue
I've tried to build manually the Request struct, but to provide a context i need to invoke WithContext that triggers a copy of the struct.
This is a benchmark of the two methods to build the Request:
var Req *http.Request

func BenchmarkNewRequest(b *testing.B) {
	ctx := context.TODO()
	for i := 0; i < b.N; i++ {
		Req, _ = http.NewRequestWithContext(ctx, "POST", "http://localhost/", nil)
	}
}

func BenchmarkNewRequestFunky(b *testing.B) {
	ctx := context.TODO()
	u, _ := url.Parse("http://localhost/")
	for i := 0; i < b.N; i++ {
		Req = &http.Request{}
		Req = Req.WithContext(ctx)
		Req.URL = u
		Req.Header = make(http.Header)
		Req.Host = u.Host
		Req.Method = "POST"
		Req.Proto = "HTTP/1.1"
		Req.ProtoMajor = 1
		Req.ProtoMinor = 1
	}
}

BenchmarkNewRequest-8        	 3054969	       417 ns/op	     432 B/op	       3 allocs/op
BenchmarkNewRequestFunky-8   	 5510088	       218 ns/op	     560 B/op	       3 allocs/op

NewRequest obviously allocates less because it doesn't trigger a copy of himself, but it's definitely slower. The reason why it's slower is dominated by the url.Parse, as these flamegraphs show:

Possible solutions

ctx of the http.Request should be exported, in order to allow people to build manually the http.Request struct with url.URL and avoid the copying
NewRequest should take url.URL as target parameter, or a new method should be created that takes url.URL as target parameter

We can’t change NewRequest as that would violate the Go 1 compatibility promise. Marking as a proposal to explore the other options:

ctx of the http.Request should be exported, in order to allow people to build manually the http.Request struct with url.URL and avoid the copying
a new method should be created that takes url.URL as target parameter

@andybons I can provide a PR for one of the two solutions (IMO exporting the ctx is the best solution here)

Let’s let the proposal review committee take an initial look first.

We've been very careful not to export context.
r := new(Request).Clone(context) will allocate a request with the context you want,
and then you can fill out r's other fields. Or you can even do
r := (&Request{...}).Clone(context)

Both of these are smart enough not to allocate two requests: only the result of Clone is actually allocated, as the benchmark shows.
We already have too much API in net/http. I am skeptical this comes up enough to want/need more here.

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

Based on the discussion above, this proposal seems like a likely decline.
— rsc for the proposal review group

No change in consensus, so declined.
— rsc for the proposal review group


SQLiteAsyncConnection.QueryAsync not returning data from columns

Hi,
I am using SQLite-net-PCL v.1.3.3 in a Xamarin Forms UWP project, and cannot understand this behaviour; don't know if it's a bug or something I haven't understood. I think I should be able to query columns from a table (FnImage, in the example below), and populate a collection of local objects (Test, below), with each instance in that collection of Test objects having the column values from a row in the FnImage table. I do not want to just create a local collection of rows from the FnImage table for memory management reasons; my result set should just include the data in the columns I am querying.
Task.Run(async () =>
{
var v = await mySQLiteAsyncConnection.QueryAsync< Test >("select 'Name', 'DbBytesThumbnail' from FnImage where 'Id' > ? ", 0);
...
}
public class Test {
public byte[] DbBytesThumbnail { get; set; }
public string Name { get; set; }
}
The code does create a collection with a single instance of Test in it (there should be more, given the data in the FnImage table), and both properties in that single instance are null. I've tried mapping 'select 'Name' as Name, 'DbBytesThumbnail' as DbBytesThumbnail..., changing the name of the properties in the local Test object and the "as" clause in the query, changing bits of syntax in the query (";" at the end, with and without single quotes, etc...) and spent hours on this with no success. The FnImage table exists, I am using it elsewhere with no problems (with the myAsyncConnection.Table() query syntax). The task does not enter a Faulted state / no exception is thrown. Is this an issue with SQLite-net-PCL, or what I am doing with it?

Did you call CreateTable at some point?
Your code looks right on first glance. I will have to try to repro.


Unable to delete EndpointGroupBinding if endpointgroup no longer exists

If i try to run kubectl delete endpointgroupbinding after deleting such resource in aws, it will hang and resource is not deleted

seem related to #198, However it was fixed by 0.14.1 and Helm Chart installs 0.14.0

a workaround is to set image.tag to 0.14.1 in the Helm Chart Values until the Chart is updated


Opener & WarnerBros added

Not sure about their remote work so wrote "No" - #1

I am not able to get the conflict with "company_database.md"

The conflict is because the files have been reorganized for better management. Kindly update with the flow.


docs: Fix typo for project

@wengchaoxi : thanks, could you please sign your commit ? (https://github.com/goharbor/terraform-provider-harbor/pull/252/checks?check_run_id=8341869568)


[Fix] extensions: handle . and .. properly

The issue was isExternalRootModule was returning true for these, since they had no / in them. This fixes that.
Closes #2777

Ideally I'd like this PR to either add tests documenting the current behavior (with a TODO comment if it's broken), or, tests matching the desired behavior and fixes for it.
While ignorePackages was intended to cover things in node_modules, i think it actually makes sense to cover a relative dir with a package.json as well. I'm wondering how large a change that would be.

I added tests that show the current behavior (says extensions are required when they shouldn't be)

Any tips on what to do about the semver module not found errors from appveyor?

Thank you!


How is the /detect/lane value calculated?

How does the /detect/lane topic value get calculated? It seems to be the only input into the control_lane node, and I'm unsure of how it is calculated. The value is approximately 500 at the center of the lane, but is sensitive to any change in the turtlebot's position left or right. The value also seems sensitive to if the turtlebot turns. The turning part has been giving me an issue, as the control tends to over-correct for the error from the center of the lane and quickly goes unstable. Adjusting the gain values seems to keep the turtlebot on track longer, but I'm hoping to gain some insight as to how the input value gets calculated.

@joshsale
Adjust Kp and Kd values in the following file and see if it works,
(/catkin_ws/src/turtlebot3_autorace/turtlebot3_autorace_control/nodes/control_lane)
twist.angular.z is the variable that you might be interested in.
Regards,
Ryan

This issue will be closed since there were no actions for a while. You can reopen this issue to show this issue to the users whenever. Thanks.


Distributing the data in a json format

It would be great to distribute the data in a json format instead of using Python-specific pickle. The performance difference is pretty insignificant, provided the json is not encoded in ASCII escapes (but even then only about 2x):
In [18]: %%timeit
    ...: with lzma.open("ru.plzma") as f:
    ...:     lem = pickle.load(f)
    ...:
117 ms ± 229 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

In [19]: %%timeit
    ...: with lzma.open("ru.json.lzma", 'rt') as f:
    ...:     lem = json.load(f)
    ...:
120 ms ± 2.32 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)

This would make it much easier to reuse the data you've collected in this project.

Hi @1over137, I'm not primarily interested in making the data available, for a growing number of languages the data goes along with a series of rules and a search algorithm. Data alone cannot perform that well.
Also, as you show above it's already clear how to load the data to reuse it, I see not further need at this point but thanks for your feedback.


Improve code completion inside templates (e.g. provide completions for container[i].^ where container is a vector<vector>)

Example:
template<bool A>
struct B{
    template<bool left, bool right>
    friend int operator-(B<left> _left, B<right> _right){ // < position 1
        return 0;
    }
};

static B<true> a;
static B<false> c; // < position 2
static int b = c - a;

it shows:

Redefinition of 'operator-'.
In instantiation of template class 'B' requested here. (in position 2)
Previous definition is here. (in position 1)

but it should work and factly works in clang-1<IP_ADDRESS>. the declaration of this function in each instance actually has only one entity.
in
clangd 10.0.0.
VSCode 1.46.
MacOS 10.15.5
by the way, clangd is always out of work in class template, such as:
template<typename T, size_t stride>
struct MeowVector{
    std::vector<T> data;
    typedef typename std::vector<T>::iterator iterator;
    typedef typename std::vector<T>::const_iterator const_iterator;
    void insert(const_iterator pos, std::vector<std::vector<T>> const& container) noexcept{
        size_t _size = container.size();
        data.reserve(data.size() + _size * stride);
        data.insert(pos, _size * stride, T());
        for (int i = 0; i != _size; ++i)
            for (int j = 0; j != container[i].size(); ++j)
                pos[i * stride + j] = container[i][j];
    }
};

the container[i].size() can not be deduced, even though it is independent of the template arguments.
it is disappointing if it can not show members and types in class templates, at least independent ones.

but it should work and factly works in clang-1<IP_ADDRESS>

Can you clarify where you got this clang version from? The recent clang versions that I'm aware of have version numbers like 8.0, 9.0, 10.0, 11.0, and all of them produce a redefinition error for this code, as does gcc.

the container[i].size() can not be deduced, even though it is independent of the template arguments.

Unfortunately, the fact that C++ templates can be specialized means that pretty much any expression involving a dependent type is going to be dependent. In this case container[i].size() is dependent because (for example) std::vector could be specialized for some T and the specialization could have a completely different declaration of operator[] (which then could have a different return type, etc.).
Clangd does have logic to heuristically resolve some dependent expressions by assuming that the templates involved are not specialized, but handling this particular case heuristically is very difficult. (See this bug for an extensive investigation into a very similar case. It's in the context of a different IDE, but the challenges are language-level and apply equally to clangd.)

clang --version
Apple clang version 11.0.3 (clang-1<IP_ADDRESS>)

I tried Xcode and VSCode to run this code, with clang -std=c++17, and it worked correctly. and in fact, I had ever written some code like this when I used msvc (VS2015, maybe -std=c++14?) in Windows before, and it still worked. before I opened this issue, I have asked someone and search about it in standard, but no results. so if it should be a redefinition, could you tell me some information about it in cpp standard?

In this case container[i].size() is dependent because (for example) std::vector could be specialized for some T and the specialization could have a completely different declaration of operator[] (which then could have a different return type, etc.).

you are right. I forget that it depends on T, something may be different in some specialization, like vector<bool>.
but in the other hand... I can imagine the difficulty of knowing the correct type and its members by pattern matching in lots of weird templates, and factly I always write these templates which may break the intellisense. but, even if container<T> in template<typename T>class Klass can not be deduced clearly, what else could it do?
To say the least, could I have any chance to hint to it that the vector<T> in some my class templates will not be any of specializations or exactly one? we use SFINAE and traits to do it in cpp code, and it seems to be weird for clangd, so I think comment hint is effective enough.

clang --version
Apple clang version 11.0.3 (clang-1<IP_ADDRESS>)

I tried Xcode and VSCode to run this code, with clang -std=c++17, and it worked correctly. and in fact, I had ever written some code like this when I used msvc (VS2015, maybe -std=c++14?) in Windows before, and it still worked. before I opened this issue, I have asked someone and search about it in standard, but no results. so if it should be a redefinition, could you tell me some information about it in cpp standard?

Thanks. I don't have access to Xcode to try this out, but I know they apply some custom patches to clang. Perhaps they have one that affects this behaviour?
As far as why this code is invalid: the issue is that the friend function's declaration does not reference the enclosing class's template parameter A at all. As a result, the friend defined in B<false> and the friend defined in B<true> are the exact same function (same signature), and you get an error about trying to define that function twice.
The error is easy to fix, by moving the definition out of line:
template<bool A>
struct B{
    template<bool left, bool right>
    friend int operator-(B<left> _left, B<right> _right);
};

int operator-(B<left> _left, B<right> _right){
    return 0;
}

static B<true> a;
static B<false> c;
static int b = c - a;

This time, B<false> and B<true> both declare the same function (which is fine), but there is only one definition.

In this case container[i].size() is dependent because (for example) std::vector could be specialized for some T and the specialization could have a completely different declaration of operator[] (which then could have a different return type, etc.).

you are right. I forget that it depends on T, something may be different in some specialization, like vector<bool>.
but in the other hand... I can imagine the difficulty of knowing the correct type and its members by pattern matching in lots of weird templates, and factly I always write these templates which may break the intellisense. but, even if container<T> in template<typename T>class Klass can not be deduced clearly, what else could it do?
To say the least, could I have any chance to hint to it that the vector<T> in some my class templates will not be any of specializations or exactly one? we use SFINAE and traits to do it in cpp code, and it seems to be weird for clangd, so I think comment hint is effective enough.

The issue here is not about assuming that vector<T> isn't specialized; our heuristics already assume that without having to be told.
Rather, the issue is knowing that the return type of vector<T>::operator[] is T (or more precisely, T&).
Let's have a look at libstdc++'s vector implementation, and see how vector<T>::operator[] is declared:
      reference
      operator[](size_type __n) _GLIBCXX_NOEXCEPT

As you can see, the declared return type is vector<T>::reference. Let's see how that's declared:
      typedef typename _Alloc_traits::reference		reference;

What is __Alloc_traits? It's:
      typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type>	_Alloc_traits;

What is _Tp_alloc_type?
      typedef typename _Base::_Tp_alloc_type		_Tp_alloc_type;

What is _Base?
      typedef _Vector_base<_Tp, _Alloc>			_Base;

Ok, how does _Vector_base define _Tp_alloc_type?
      typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template
	rebind<_Tp>::other _Tp_alloc_type;

I could go on, but I think you get the idea: the fact that vector<T>::reference is in fact T& is obscured by a generous amount of metaprogramming that's difficult to see through.
One way to think about this is that the type vector<T>::reference is the result of a compile-time program (metaprogram) whose input is the type T.
For a concrete type, there is no problem: you plug in e.g. T = int, run the metaprogram, and eventually get the result that vector<int>::reference = int&.
However, with a dependent type like T, you can't just "run the metaprogram" to come up with the answer that vector<T>::reference = T&, because metaprograms are not meant to be run with dependent types as inputs.

Thanks. I don't have access to Xcode to try this out, but I know they apply some custom patches to clang. Perhaps they have one that affects this behaviour?
As far as why this code is invalid: the issue is that the friend function's declaration does not reference the enclosing class's template parameter A at all. As a result, the friend defined in B and the friend defined in B are the exact same function (same signature), and you get an error about trying to define that function twice.

ok I will change it. I assumed the maybe duplicate definition will be converted to just one entity before, which may be what Xcode and VS do. I think it's easier to change it to asymmetric parameters, if I define it outside the class template, a lot of exhausting template arguments should be written.

The issue here is not about assuming that vector<T> isn't specialized; our heuristics already assume that without having to be told.
Rather, the issue is knowing that the return type of vector<T>::operator[] is T (or more precisely, T&).

I got it. but, hardly a method defined in vector<T> is not dependent on these weird type definitions, so I still think it's not ideal if no help of vector<T>::operator[] or even the whole vector<T> is given in a class template.
honestly, it's always necessary to use some TMP ways in a simple class template, such as std::enable_if_t<XXX> or just typedef typename XXX<YYY>::ZZZ ZZZ, but in most cases, they have similar behavior.
so why not assume typename T = int or bool flag = true to get more informations? if it does not pass, choose another arguments and try again, until no predictable arguments work.
and furthermore, give me a chance to write something like:
// hint with float, 3
template<typename T, size_t stride>
class XXX;

// hint with true
template<bool>
class YYY;

to avoid the clangd not working when in a simple class template. is there some ways like it?

(My apologies, I accidentally edited your last comment when I meant to reply to it... I wish GitHub didn't make that so easy to do accidentally. Anyways, I've restored your comment the best I could, and my answer follows.)

I got it. but, hardly a method defined in vector<T> is not dependent on these weird type definitions, so I still think it's not ideal if no help of vector<T>::operator[] or even the whole vector<T> is given in a class template.

Note, we do offer completions for members of vector<T> (which are taken for the primary template definition of vector). It's only for dependent types that we can't map to a physical class definition (like vector<T>::reference) that it fails.
I agree that this is not ideal. Unfortunately, as I've explained, we are limited by the nature of C++ templates. Newer languages have learned from C++'s example and designed template-like features (like Rust's generics) that are much easier to write tooling for.

so why not assume typename T = int or bool flag = true to get more informations? if it does not pass, choose another arguments and try again, until no predictable arguments work.

This is an interesting suggestion. I can think of two potential issues with it:

Not all templates can be successfully instantiated with all template parameter values, and compilers aren't necessarily designed to recover from arbitrary instantiation attempts. So, if we try to speculatively instantiate e.g. A<T> with T = int, and that causes a hard (non-SFINAE) error inside A, I don't think clang is designed to be able to recover from that and pretend the instantiation attempt didn't happen. (I could be mistaken about this; perhaps others who are more knowledgeable can chime in and confirm or refute this.)

Even if we overcome the first problem, we can't necessarily generalize the result of a concrete metaprogram result to a dependent type. So suppose we compute that for some template A, A<int>::type = int. Is that enough for us to conclude that A<T>::type = T? Not necessarily! For all we know, the definition of type may boil down to "if sizeof(T) < 8 then int otherwise long". And what if we find A<int>::type = float? That tells us approximately nothing about what A<T>::type is.

and furthermore, give me a chance to write something like:
// hint with float, 3
template<typename T, size_t stride>
class XXX;

// hint with true
template<bool>
class YYY;

to avoid the clangd not working when in a simple class template. is there some ways like it?

There is nothing like this right now, but this is another interesting suggestion, and it would address the issues mentioned above with the previous suggestion.
I do wonder how likely is it that people are willing to add comments to their code that are incantations specific to clangd, but I guess there is some precedent here, e.g. with clang-tidy's // NOLINT.

For completeness, I'll mention what I think is a more principled solution to the problem of code completion inside C++ templates: leveraging C++20 Concepts. If a template parameter is constrained by a concept, we have a lot more information about what sorts of values will be passed as an argument, and we can leverage that to provide better completion.
We've already done some work in this area in #261. With some further work, and a conceptified standard library implementation, I believe the vector<T>::reference issue can be solved too.

(Updating title of issue to reflect the second topic (code completion inside templates), as the first topic (related to friend functions) has been addressed and there is nothing to fix there.)

Not all templates can be successfully instantiated with all template parameter values, and compilers aren't necessarily designed to recover from arbitrary instantiation attempts. So, if we try to speculatively instantiate e.g. A<T> with T = int, and that causes a hard (non-SFINAE) error inside A, I don't think clang is designed to be able to recover from that and pretend the instantiation attempt didn't happen. (I could be mistaken about this; perhaps others who are more knowledgeable can chime in and confirm or refute this.)
Even if we overcome the first problem, we can't necessarily generalize the result of a concrete metaprogram result to a dependent type. So suppose we compute that for some template A, A<int>::type = int. Is that enough for us to conclude that A<T>::type = T? Not necessarily! For all we know, the definition of type may boil down to "if sizeof(T) < 8 then int otherwise long". And what if we find A<int>::type = float? That tells us approximately nothing about what A<T>::type is.

yes, that is a problem, and I know we can not completely solve this problem right now. I'm sorry that I don't know how clangd works clearly, so it's just a suggestion trying to get more informations.
concepts in C++20 is a great work to look forward to, but it's far from us now and even when it releases, there will be many developers who may not use it, because of the cost of compatibility and so on. a solution is still needed before C++20.
for the second problem, the main idea for me is, to try lots of patterns and

do an approximate decision (for A<T>::reference, A<int>::reference = int& and A<float>::reference = float& inaccurately prove A<T>::reference = T&), or
just give a hint like A<int>::reference = int&, or even
give up the incorrect type deduction, but offer an approximate member deduction (for vector<vector<T>> container, treat container[i] as vector<int>, and show the members of vector<int>, because of the guess of vector<vector<int>>).

and then we consider this comment hint:

// hint with float, 3
template<typename T, size_t stride>
class XXX;

// hint with true
template<bool>
class YYY;

it gives a chance to tell clangd how to deduce the types and members and give user informations that they need. If I know my class template A<T> is a container, I wish clangd to treat it as a container, such as deduce with T = int, which I can hint clangd in the comment. it's almost useful if clangd tells me what A<int> is when I hint it T = int. it's my duty to ensure T = int works.
in the other hand, STL is almost defined by cpp standard. why not do more assumptions by standard? such as vector<T>::reference = T&, unless T = bool. I think it will be a big improvement for intellisense, because most of time we use STL instead of other template libraries. in other words, it's better than nothing will be given even if we use STL.
finally, it's just a personal suggestion. the above-mentioned are just fit for me, maybe other programmers have their own needs. it doesn't mean I think it must be like this. I just want something more can be done to solve this problem. and at least, I don't mind writing lots of hints in comment to tell clangd what I want, after all, I use template.

Rather, the issue is knowing that the return type of vector<T>::operator[] is T (or more precisely, T&).
Let's have a look at libstdc++'s vector implementation, and see how vector<T>::operator[] is declared:

Out of curiosity, I looked up libcxx's vector implementation, and there is considerably less template metaprogramming there. I think we may be able to enhance our heuristics to the point where they can see through libcxx's vector implementation (but not libstdc++'s one).

Hello! I'm having trouble getting code assistance to work inside of template function bodies. This does not appear to be related to complexity of includes. Consider this code sample:
template <typename A, typename B>
struct Pair {
  A first;
  B second;
};

template <typename C>
struct Vector {
  C& front();
  C const& front() const;
};

template <typename D, typename E>
void test(Vector<Pair<D, E>> const& vec) {
  vec.front().  // my cursor position is here
}

This is the entire file, there are no includes. I expect suggestions to include first [D] and second [E].
This works just fine in Eclipse:

The exact same suggestion in Kate using its LSP client and clangd:

Notice how clangd thinks front() returns C&. It has not substituted C with Pair<D, E>.
The command used by kate to invoke clangd is
/usr/bin/clangd-15 \
    -log=error \
    --background-index \
    --limit-results=500 \
    --completion-style=detailed \
    --completion-parse=always \
    --all-scopes-completion \
    --include-ineligible-results \
    --parse-forwarding-functions \
    --use-dirty-headers \
    --malloc-trim \
    -j=8 \
    --query-driver=/usr/bin/c++,/usr/bin/g++,/usr/bin/clang++*\
    --function-arg-placeholders

The output of --version:
$ /usr/bin/clangd-15 --version
Debian clangd version 15.0.7
Features: linux+grpc
Platform: x86_64-pc-linux-gnu

@fgelm01 code completion for the case you mention is not currently implemented in clangd. We have #451 open for it.

Notice how clangd thinks front() returns C&. It has not substituted C with Pair<D, E>.

Right, this substitution step is exactly what's not implemented. There is some discussion of it in these two comments:

https://github.com/clangd/clangd/issues/227#issuecomment-565871316
https://github.com/clangd/clangd/issues/227#issuecomment-565873123

The second comment suggests that this substitution may be more challenging to perform with clang AST, than it is with Eclipse CDT's AST. I think it's nonetheless worth trying, and I'd like to do so at some point.
If you're interested in trying to implement this improvement, let me know, I can try to provide guidance.

Hello @HighCommander4. I'd be willing to give it a try, and any guidance would be appreciated. Please be aware that I have not worked on clang, llvm, or clangd in the past.
What is a good starting point? So far I have read over Design of clangd and am currently browsing SemaCodeComplete.cpp.

I glossed over this when I wrote the previous comment, but #451 tracks the equivalent of this for features that use HeuristicResolver (mostly go-to-definition), and leveraging this in other features like code completion requires some additional steps.
So, a roadmap for getting this to work for code completion would involve the following steps:

Implement the substitution logic in HeuristicResolver. This is tracked in #451, and I have an (old) WIP patch for it which can be used as a starting point.
Upstream HeuristicResolver to the clang libraries, so code outside of clangd (like SemaCodeComplete.cpp) can use it. This is tracked in https://github.com/clangd/clangd/discussions/1662. A concrete first step discussed there is to write dedicated tests that exercise the HeuristicResolver interface directly.
Actually use HeuristicResolver in SemaCodeComplete.cpp. (This should be straightforward with the previous two pieces in place.)

(1) and (2) can be worked on in parallel. If you're interested in helping out with either one, please feel free to post to the respective issue thread and I'm happy to provide further guidance.

I found that clion can provide completion in this case. It can also provide inlay hint for the variable.

Given that CLion can achieve this, I believe clangd can achieve it as well. After reading the previous discussions, I have some basic ideas. Based on the primary template assumption, we can always simplify a complex dependent name type into a type that does not contain dependent names. For example:
template<typename T>
struct A {
    using type = T&;
};

template<typename U>
void foo(typename A<U>::type ref);
// typename A<U>::type => U&

Or a direct dependent name:
template<typename T>
struct A {
    using type = typename T::type;
};

template<typename U>
void foo(typename A<U>::type ref);
// typename A<U>::type => typename U::type

In recent days, I have been validating this idea and have achieved some initial success. The code is as follows:
class DependentShaper {
    clang::ASTContext& context;

public:
    DependentShaper(clang::ASTContext& context) : context(context) {}

    /// replace template arguments in a dependent type
    /// e.g.
    /// ```cpp
    /// template <typename T1, typename T2>
    /// struct A {
    ///     using reference = T1&;
    /// };
    ///
    /// template <typename U1, typename U2>
    /// struct B {
    ///    using type = A<U1, U2>::reference;
    /// };
    /// ```
    /// we want to simplify `A<U1, U2>::reference` to `U1&`, then we need to call
    /// `replace(<T1&>, <T1 = U1, T2 = U2>)` to get `U1&`.
    clang::QualType replace(clang::QualType input,
                            llvm::ArrayRef<clang::TemplateArgument> originalArguments) {
        assert(type->isDependentType() && "type is not dependent");

        // if the input is still a dependent name type, we need to simplify it recursively
        while(auto type = llvm::dyn_cast<clang::DependentNameType>(input)) {
            input = simplify(type);
        }

        if(auto type = llvm::dyn_cast<clang::LValueReferenceType>(input)) {
            auto pointee = type->getPointeeType();

            while(auto elaboratedType = llvm::dyn_cast<clang::ElaboratedType>(pointee)) {
                pointee = elaboratedType->desugar();
            }

            // get the position of the dependent type in the template parameter list
            // e.g `T1` in <typename T1, typename T2>, the index is 0
            if(auto paramType = llvm::dyn_cast<clang::TemplateTypeParmType>(pointee)) {
                auto index = paramType->getIndex();
                auto argument = originalArguments[index];

                // create a new type that fit the replacement
                return context.getLValueReferenceType(argument.getAsType());
            } else if(auto defType = llvm::dyn_cast<clang::TypedefType>(pointee)) {
                return replace(defType->getDecl()->getUnderlyingType(), originalArguments);
            } else {
                pointee->dump();
                std::terminate();
            }
        }
        // TODO: handle other kinds

        return input;
    }

    clang::NamedDecl* lookup(const clang::ClassTemplateDecl* classTemplateDecl,
                             const clang::IdentifierInfo* identifier) {
        clang::CXXRecordDecl* recordDecl = classTemplateDecl->getTemplatedDecl();
        auto result = recordDecl->lookup(identifier);
        return result.front();
    }

    /// for a complex dependent type: `X<...>::name::name2::...::nameN`, we can resolve it recursively.
    /// so we only need to handle the `X<...>::name`, whose prefix is a template specialization type.
    clang::QualType simplify(const clang::TemplateSpecializationType* templateType,
                             const clang::IdentifierInfo* identifier) {
        // X is a class template or a type alias template
        auto templateDecl = templateType->getTemplateName().getAsTemplateDecl();
        if(auto classTemplateDecl = llvm::dyn_cast<clang::ClassTemplateDecl>(templateDecl)) {
            // lookup the identifier in the record decl
            auto namedDecl = lookup(classTemplateDecl, identifier);

            if(auto decl = llvm::dyn_cast<clang::TypeAliasDecl>(namedDecl)) {
                return replace(decl->getUnderlyingType(), templateType->template_arguments());
            } else if(auto decl = llvm::dyn_cast<clang::TypedefDecl>(namedDecl)) {
                return replace(decl->getUnderlyingType(), templateType->template_arguments());
            } else {
                namedDecl->dump();
            }

        } else if(auto aliasTemplateDecl = llvm::dyn_cast<clang::TypeAliasTemplateDecl>(templateDecl)) {
            // TODO:
        } else {
            templateDecl->dump();
        }
    }

    const clang::QualType simplify(const clang::NestedNameSpecifier* specifier,
                                   const clang::IdentifierInfo* identifier) {
        auto kind = specifier->getKind();
        switch(specifier->getKind()) {
            case clang::NestedNameSpecifier::Identifier: {
                const auto prefix = simplify(specifier->getPrefix(), specifier->getAsIdentifier());

                if(auto type = llvm::dyn_cast<clang::TemplateSpecializationType>(prefix)) {
                    return simplify(type, identifier);
                } else {
                    prefix->dump();
                }

                break;
            }

            case clang::NestedNameSpecifier::TypeSpec: {
                auto node = specifier->getAsType();

                if(auto type = llvm::dyn_cast<clang::TemplateTypeParmType>(node)) {
                    // represent a direct dependent name, e.g. typename T::^ name
                    // and can not be further simplified
                    // node->dump();
                    type->dump();
                } else if(auto type = node->getAs<clang::TemplateSpecializationType>()) {
                    // represent a dependent name that is a template specialization
                    // e.g. typename vector<int>::^ name, and can be further simplified
                    return simplify(type, identifier);
                } else {
                    node->dump();
                }

                break;
            }

            case clang::NestedNameSpecifier::TypeSpecWithTemplate: {
                llvm::outs() << "unsupported kind: " << kind << "\n";
                break;
            }

            default: {
                llvm::outs() << "unsupported kind: " << kind << "\n";
            }
        }
    }

    const clang::QualType simplify(const clang::DependentNameType* type) {
        return simplify(type->getQualifier(), type->getIdentifier());
    }
};

It can now handle the following code:
template <typename T>
struct A {
    using reference = T&;
};

template <typename U>
struct B {
    using reference = A<U>::reference;
};

template <typename Z>
struct C {
    using type = B<Z>::reference;
};

B<Z>::reference can be simplified to Z&. Of course, there are still many edge cases that haven't been considered, but I believe the current direction is correct.
Some questions:

In the above code, the process of replacing template arguments involves manually unpacking the ReferenceType and replacing it according to the index of the TemplateTypeParmType. I wonder if clang provides some built-in functions to achieve this.
For code completion, CodeCompletionContext provides a function getBaseType() to get the type of member.* in member, which seems to allow us to collect completion information without modifying clang upstream code, after simplifying the dependent name ourselves.

Yes, this is definitely doable with some work. The recursive "simplification" logic in your code example is similar to the recursive logic in HeuristicResolver which I think we'd want to extend (currently it doesn't do anything like your replace step).

In the above code, the process of replacing template arguments involves manually unpacking the ReferenceType and replacing it according to the index of the TemplateTypeParmType. I wonder if clang provides some built-in functions to achieve this.

I believe a general version of this replacement, which takes an arbitrary type that references template parameters, and replaces the template parameters with template arguments provided as input, no matter where in the type they are located, is done by Sema::SubstType.
The high-level idea of calling into Sema to perform substitution is also what my old WIP patch was based on, though the specific Sema function called in that patch is different.

For code completion, CodeCompletionContext provides a function getBaseType() to get the type of member.* in member, which seems to allow us to collect completion information without modifying clang upstream code, after simplifying the dependent name ourselves.

I don't think I'm following his part -- could you elaborate on how we would implement heuristics without modifying SemaCodeComplete.cpp?

Sorry, I guessed wrong.
I notice that there a function named getBaseType which can be used to get the type of member in member.^. So I think we can use it to get the dependentNameType and simplify it, then we can provide some completion result ourselves based on the simplified type. However, after a actual try, I find it return meaningless result in dependent case.
For example:
#include <vector>

template<typename T>
void foo(){
    typename std::vector<std::vector<T>>::reference vec;
    vec.^
}

the result is
BuiltinType 0x55f69c416df0 '<dependent type>' dependent

The result actually makes no sense. So we still need to modify the SemaCodeComplete.cpp to achieve our goal.
By the way, I am a college student currently on summer break, and I have about a month of free time to study this issue. I hope I can eventually solve this problem :).

Note that there isn't any problem with modifying SemaCodeComplete.cpp; we've done it before to make code completion enhancement to clangd. (Such modifications also have the side effect of improving code completion for other clients of SemaCodeComplete such as libclang.)
The only catch is that currently, we don't have access to HeuristicResolver in SemaCodeComplete.cpp. I'm hoping to change that in the near future as discussed in https://github.com/clangd/clangd/discussions/1662.

Ok, after a quick view of SemaCodeComplete.cpp, I have found it's very easy to support HeuristicResolver for it. the main logic is located at getAsRecordDecl. Currently, it can only handle TemplateSpecializationType and can not handle DependentNameType.
So, I will focus on extending HeuristicResolver in next days.


OpenAI o1 support?

Issue
Just wondering if OpenAI o1 support is on the roadmap
Version and model info
No response

Yes it is supported.

There's no API access for o1. Any o1 models with API access are already supported.


Add Indie UI

Name
Link

Indie UI
https://ui.indie-starter.dev/

Collection of cool UI components.

[x] My item is in the right category
[x] My item is logically grouped below similar items
[x] My item's name and description respects the conventions of the list
[x] My item is awesome
[x] My item is in line with the Tailwind brand usage guidelines
[x] I have read and followed the contribution guidelines

I couldn't figure out what I did wrong!

@Ali-Hussein-dev the linter issue is not your fault!
That being said, can you rename the PR and update the description of Indie UI in the README to abide by the contribution guidelines please?


jquery.validate.unobtrusive uses the parseJSON() method, which is deprecated in jQuery 3.0

Subject of the issue
Calls to deprecated jQuery.parseJSON() method
Your environment
jquery-validate version 1.19.1
jquery version 3.4.1
jquery-migrate version 3.0.0
Chrome version 80.0.3987.149
Steps to reproduce
Call either the onSuccess or onError methods of jquery.validate.unobtrusive.
Expected behaviour
No errors/warning reported by the jQuery migration tool
Actual behaviour
The jQuery Migration tool reports that parseJSON() has been deprecated and advises that the native JSON.parse() method should now be used.

This should be resolved in the latest release.


Improve ValidationError wording for product attributes

https://github.com/tangentlabs/django-oscar/blob/master/oscar/apps/catalogue/abstract_models.py#L790 and https://github.com/tangentlabs/django-oscar/blob/master/oscar/apps/catalogue/abstract_models.py#L793 are probably hard to understand for the general public.

All ValidationError messages looks clear now. Closing.


pock.dev is down since some days

Describe the bug
Pock.dev is down since some days. Can't download.
How to reproduce
1. Go to 'http://pock.dev'
2. See error

Expected behavior
Website opens

The site seems to work fine atm.

Oh oh.  I installed pew.cx many many years ago and all .dev Domains are routed to localhost 😞
Thank you for you support.


UnmarshalYAML for property.Map

property.Map needs to implement UnmarshalYAML because the bosh-cli will make use of this map when it unmarshals the stemcell.MF as part of the story #144851625.

Merge Story: https://www.pivotaltracker.com/story/show/151616610

yay, thanks!