nla-connection to Windows7 with CredSSP patch stopped working again (de83f4df2)

With current master (de83f4df2) nla connections to a Windows7 Prof. with CredSSP patch stopped working. With the older version f8baeb724 it still works.
Connecting with /sec:tls to Windows7 works with the new version.
Connecting with /sec:nla to Winsows10 (Insider) works with the new version.
xfreerdp /buildconfig :
This is FreeRDP version 2.0.0-dev2 (de83f4df2)
Build configuration: BUILD_TESTING=OFF BUILTIN_CHANNELS=OFF HAVE_AIO_H=1 HAVE_EXECINFO_H=1 HAVE_FCNTL_H=1 HAVE_INTTYPES_H=1 HAVE_JOURNALD_H=TRUE HAVE_MATH_C99_LONG_DOUBLE=1 HAVE_POLL_H=1 HAVE_PTHREAD_MUTEX_TIMEDLOCK=ON HAVE_PTHREAD_MUTEX_TIMEDLOCK_LIB=1 HAVE_PTHREAD_MUTEX_TIMEDLOCK_SYMBOL= HAVE_SYSLOG_H=1 HAVE_SYS_EVENTFD_H=1 HAVE_SYS_FILIO_H= HAVE_SYS_MODEM_H= HAVE_SYS_SELECT_H=1 HAVE_SYS_SOCKIO_H= HAVE_SYS_STRTIO_H= HAVE_SYS_TIMERFD_H=1 HAVE_TM_GMTOFF=1 HAVE_UNISTD_H=1 HAVE_XI_TOUCH_CLASS=1 WITH_ALSA=ON WITH_CCACHE=ON WITH_CHANNELS=ON WITH_CLIENT=ON WITH_CLIENT_AVAILABLE=1 WITH_CLIENT_CHANNELS=ON WITH_CLIENT_CHANNELS_AVAILABLE=1 WITH_CLIENT_COMMON=ON WITH_CLIENT_INTERFACE=OFF WITH_CUPS=ON WITH_DEBUG_ALL=OFF WITH_DEBUG_CAPABILITIES=OFF WITH_DEBUG_CERTIFICATE=OFF WITH_DEBUG_CHANNELS=OFF WITH_DEBUG_CLIPRDR=OFF WITH_DEBUG_DVC=OFF WITH_DEBUG_KBD=OFF WITH_DEBUG_LICENSE=OFF WITH_DEBUG_MUTEX=OFF WITH_DEBUG_NEGO=OFF WITH_DEBUG_NLA=OFF WITH_DEBUG_NTLM=OFF WITH_DEBUG_RAIL=OFF WITH_DEBUG_RDP=OFF WITH_DEBUG_RDPDR=OFF WITH_DEBUG_RDPEI=OFF WITH_DEBUG_REDIR=OFF WITH_DEBUG_RFX=OFF WITH_DEBUG_RINGBUFFER=OFF WITH_DEBUG_SCARD=OFF WITH_DEBUG_SND=OFF WITH_DEBUG_SVC=OFF WITH_DEBUG_SYMBOLS=OFF WITH_DEBUG_THREADS=OFF WITH_DEBUG_TIMEZONE=OFF WITH_DEBUG_TRANSPORT=OFF WITH_DEBUG_TSG=OFF WITH_DEBUG_TSMF=OFF WITH_DEBUG_WND=OFF WITH_DEBUG_X11=OFF WITH_DEBUG_X11_CLIPRDR=OFF WITH_DEBUG_X11_LOCAL_MOVESIZE=OFF WITH_DEBUG_XV=OFF WITH_DIRECTFB=OFF WITH_EVENTFD_READ_WRITE=1 WITH_FFMPEG=ON WITH_GFX_H264=ON WITH_GPROF=OFF WITH_GSM=ON WITH_GSSAPI=OFF WITH_GSTREAMER_0_10=OFF WITH_GSTREAMER_1_0=ON WITH_ICU=OFF WITH_IPP=OFF WITH_JPEG=ON WITH_KRB5=ON WITH_LIBRARY_VERSIONING=ON WITH_LIBSYSTEMD=ON WITH_MACAUDIO=OFF WITH_MACAUDIO=OFF WITH_MACAUDIO_AVAILABLE=0 WITH_MANPAGES=ON WITH_MBEDTLS=OFF WITH_OPENH264=OFF WITH_OPENSLES=OFF WITH_OPENSSL=ON WITH_OSS=OFF WITH_PCSC=ON WITH_PROFILER=OFF WITH_PULSE=ON WITH_SAMPLE=OFF WITH_SANITIZE_ADDRESS=OFF WITH_SANITIZE_ADDRESS_AVAILABLE=1 WITH_SANITIZE_LEAK=OFF WITH_SANITIZE_LEAK_AVAILABLE=1 WITH_SERVER=OFF WITH_SERVER_INTERFACE=ON WITH_SMARTCARD_INSPECT=ON WITH_SSE2=ON WITH_THIRD_PARTY=OFF WITH_VALGRIND_MEMCHECK=OFF WITH_VALGRIND_MEMCHECK_AVAILABLE=1 WITH_WAYLAND=ON WITH_X11=ON WITH_X264=OFF WITH_XCURSOR=ON WITH_XEXT=ON WITH_XFIXES=ON WITH_XI=ON WITH_XINERAMA=ON WITH_XKBFILE=ON WITH_XRANDR=ON WITH_XRENDER=ON WITH_XSHM=ON WITH_XV=ON WITH_ZLIB=ON
Build type:          Release
CFLAGS:               -march=i686 -Wall -Wno-unused-result -Wno-unused-but-set-variable -Wno-deprecated-declarations -fvisibility=hidden -Wimplicit-function-declaration -Wredundant-decls
Compiler:            GNU, 7.3.1
Target architecture: x86

The error:
19:57:55:788] [6794:6795] [ERROR][com.freerdp.core] - freerdp_set_last_error ERRCONNECT_PASSWORD_CERTAINLY_EXPIRED [0x0002000F]
[19:57:55:789] [6794:6795] [ERROR][com.freerdp.core.transport] - BIO_read returned an error: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error

@hendwolt Could you give some additional details of your server setup?
Can connect to our windows 7 test vm fine, so there must be some difference.
(got NLA version 2 in nla_decode_ts_request so maybe you have another config enforcing a higher level?)

@hendwolt Just tried with Win 7 Pro x64 and Ultimate x64 - can connect to both of them using either release or debug builds of current master. Please give us some more details on the server setup.

I can confirm @hendwolt experience.
Current master  15fb91726713ac94792c555409d21a061ba7579d fails to connect to Win7 Prof 64 Bit and Windows Server 2008. A checkout of  f8baeb7 works just fine.

@marrowsuck and we still don't know your setups and can not reproduce.
Anyone want to answer that question?

What information do you need?

I get higher version numbers:
nla-version from input:
18:05:41:931] [4114:4115] [ERROR][com.freerdp.core.nla] - NLA version 6
version from ber_read_integer(s, &version):
[18:05:41:932] [4114:4115] [ERROR][com.freerdp.core.nla] - version 5
Here is the debug log plus the version numbers:
[18:05:41:887] [4114:4115] [WARN][com.winpr.sspi] - InitializeSecurityContextA status SEC_E_NO_CREDENTIALS [0x8009030E]
[18:05:41:887] [4114:4115] [INFO][com.winpr.sspi.NTLM] - VERSION ={
[18:05:41:887] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        ProductMajorVersion: 6
[18:05:41:887] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        ProductMinorVersion: 1
[18:05:41:887] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        ProductBuild: 7601
[18:05:41:887] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        Reserved: 0x000000
[18:05:41:887] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMRevisionCurrent: 0x0F
[18:05:41:931] [4114:4115] [ERROR][com.freerdp.core.nla] - NLA version 6
[18:05:41:932] [4114:4115] [ERROR][com.freerdp.core.nla] - version 5
[18:05:41:932] [4114:4115] [INFO][com.winpr.sspi.NTLM] - negotiateFlags "0xE2898235"
[18:05:41:932] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_56 (0),
[18:05:41:932] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_KEY_EXCH (1),
[18:05:41:932] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_128 (2),
[18:05:41:932] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_VERSION (6),
[18:05:41:933] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_TARGET_INFO (8),
[18:05:41:933] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_EXTENDED_SESSION_SECURITY (12),
[18:05:41:933] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_TARGET_TYPE_DOMAIN (15),
[18:05:41:933] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_ALWAYS_SIGN (16),
[18:05:41:933] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_NTLM (22),
[18:05:41:933] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_SEAL (26),
[18:05:41:933] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_SIGN (27),
[18:05:41:933] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_REQUEST_TARGET (29),
[18:05:41:933] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_UNICODE (31),
[18:05:41:933] [4114:4115] [INFO][com.winpr.sspi.NTLM] - VERSION ={
[18:05:41:933] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        ProductMajorVersion: 6
[18:05:41:934] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        ProductMinorVersion: 1
[18:05:41:934] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        ProductBuild: 7601
[18:05:41:934] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        Reserved: 0x000000
[18:05:41:934] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMRevisionCurrent: 0x0F
[18:05:41:934] [4114:4115] [INFO][com.winpr.sspi.NTLM] - AV_PAIRs =
[18:05:41:934] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvNbDomainName AvId: 2 AvLen: 4
[18:05:41:937] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 5a 00 57 00                                     Z.W.
[18:05:41:937] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvNbComputerName AvId: 1 AvLen: 26
[18:05:41:938] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 4c 00 59 00 4e 00 58 00 2d 00 48 00 45 00 4e 00 L.Y.N.X.-.H.E.N.
[18:05:41:938] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0010 44 00 57 00 4f 00 4c 00 54 00                   D.W.O.L.T.
[18:05:41:938] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvDnsDomainName AvId: 4 AvLen: 20
[18:05:41:938] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 7a 00 77 00 2e 00 78 00 63 00 6f 00 6d 00 2e 00 z.w...x.c.o.m...
[18:05:41:938] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0010 64 00 65 00                                     d.e.
[18:05:41:938] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvDnsComputerName AvId: 3 AvLen: 48
[18:05:41:938] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 6c 00 79 00 6e 00 78 00 2d 00 68 00 65 00 6e 00 l.y.n.x.-.h.e.n.
[18:05:41:938] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0010 64 00 77 00 6f 00 6c 00 74 00 2e 00 7a 00 77 00 d.w.o.l.t...z.w.
[18:05:41:938] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0020 2e 00 78 00 63 00 6f 00 6d 00 2e 00 64 00 65 00 ..x.c.o.m...d.e.
[18:05:41:938] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvTimestamp AvId: 7 AvLen: 8
[18:05:41:938] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 3f c3 ef d7 36 c1 d3 01                         ?...6...
[18:05:41:940] [4114:4115] [INFO][com.winpr.sspi.NTLM] - negotiateFlags "0xE288B235"
[18:05:41:940] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_56 (0),
[18:05:41:940] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_KEY_EXCH (1),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_128 (2),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_VERSION (6),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_TARGET_INFO (8),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_EXTENDED_SESSION_SECURITY (12),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_ALWAYS_SIGN (16),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED (18),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_DOMAIN_SUPPLIED (19),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_NTLM (22),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_SEAL (26),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_SIGN (27),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_REQUEST_TARGET (29),
[18:05:41:941] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMSSP_NEGOTIATE_UNICODE (31),
[18:05:41:942] [4114:4115] [INFO][com.winpr.sspi.NTLM] - VERSION ={
[18:05:41:942] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        ProductMajorVersion: 6
[18:05:41:942] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        ProductMinorVersion: 1
[18:05:41:942] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        ProductBuild: 7601
[18:05:41:942] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        Reserved: 0x000000
[18:05:41:942] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        NTLMRevisionCurrent: 0x0F
[18:05:41:945] [4114:4115] [INFO][com.winpr.sspi.NTLM] - AV_PAIRs =
[18:05:41:945] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvNbDomainName AvId: 2 AvLen: 4
[18:05:41:945] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 5a 00 57 00                                     Z.W.
[18:05:41:945] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvNbComputerName AvId: 1 AvLen: 26
[18:05:41:945] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 4c 00 59 00 4e 00 58 00 2d 00 48 00 45 00 4e 00 L.Y.N.X.-.H.E.N.
[18:05:41:945] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0010 44 00 57 00 4f 00 4c 00 54 00                   D.W.O.L.T.
[18:05:41:945] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvDnsDomainName AvId: 4 AvLen: 20
[18:05:41:946] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 7a 00 77 00 2e 00 78 00 63 00 6f 00 6d 00 2e 00 z.w...x.c.o.m...
[18:05:41:946] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0010 64 00 65 00                                     d.e.
[18:05:41:946] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvDnsComputerName AvId: 3 AvLen: 48
[18:05:41:946] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 6c 00 79 00 6e 00 78 00 2d 00 68 00 65 00 6e 00 l.y.n.x.-.h.e.n.
[18:05:41:946] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0010 64 00 77 00 6f 00 6c 00 74 00 2e 00 7a 00 77 00 d.w.o.l.t...z.w.
[18:05:41:946] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0020 2e 00 78 00 63 00 6f 00 6d 00 2e 00 64 00 65 00 ..x.c.o.m...d.e.
[18:05:41:946] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvTimestamp AvId: 7 AvLen: 8
[18:05:41:946] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 3f c3 ef d7 36 c1 d3 01                         ?...6...
[18:05:41:946] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvFlags AvId: 6 AvLen: 4
[18:05:41:946] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 02 00 00 00                                     ....
[18:05:41:947] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvChannelBindings AvId: 10 AvLen: 16
[18:05:41:947] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
[18:05:41:947] [4114:4115] [INFO][com.winpr.sspi.NTLM] -        MsvAvTargetName AvId: 9 AvLen: 46
[18:05:41:947] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0000 54 00 45 00 52 00 4d 00 53 00 52 00 56 00 2f 00 T.E.R.M.S.R.V./.
[18:05:41:947] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0010 31 00 39 00 32 00 2e 00 31 00 36 00 38 00 2e 00 1.9.2...1.6.8...
[18:05:41:947] [4114:4115] [INFO][com.winpr.sspi.NTLM] - 0020 31 00 30 00 30 00 2e 00 31 00 32 00 31 00       1.0.0...1.2.1.

The remote Windows7 Prof. is a member of a domain. Otherwise the settings are pretty much standard.

Same for me.  Current master doesn't work, but f8baeb7 works.

Can also confirm.  I can no longer connect to my Windows 2012 server with latest Windows updates applied.  I get the overconfident error about my password "certainly" being expired which is certainly not the case.  f8baeb7 works just fine.

@mdunc Yes, these are applied. The first fix for that issue was to enforce NLA version 3.
The latest patches added NLA support for versions up to 6, which will be required soon.
The roadmap of MS is to disable older insecure NLA versions as far as I'm informed.
We did test these changes on our local VM test machines (so nearly all recent OS version),
but it looks like some configuration is required to force this error.
Working on it (documentation is quite fresh and some details are missing or vague) and should be resolved soon.
So, sorry for the inconvenience, but we need these fixes with feedback to know if it is working everywhere before we can tag the next release.

OK so I have done following tests - all with a Win 7 Ultimate x64 machine with latest updates installed:

Machine not in domain, using machine account: works
Machine in domain, using machine account: works
Machine in domain, using domain account: works

In every case the server reports that it want's to use CredSSP protocol version 2 (the old code path) ...
I'm running out of ideas what is configured differently on your machines ...
Any ideas @hendwolt @kb1ooo , @mdunc ?

I also tried both client - wfreerdp and xfreerdp ... both work for me (same scenarios as described above)

OK - apparently when Windows Update says "No more updates available" it actually means go find and install them yourselves ...
After installing KB4088875 I can now reproduce the issue - trying to get it fixed asap. Sorry for the confusion ...

Glad you got that figured out.  We ran Windows updates for our Windows 2012 servers on March 14 and that patch came in then.  Maybe it's not a regular patch for Windows 7?  Anyway, thanks for looking in to it!

Thank you, it works again :-)

As of current Master, should it be possible to connect using NLM again?
Connecting via TLS (if the force NLM requirement is disabled on the server) works fine, but trying to connect using NLM with the force NLM requirement on the server enabled, results in the error ERRCONNECT_LOGON_FAILURE.

Yes, it should work.

Hi all, I'm using "This is FreeRDP version 2.0.0-rc1 (2.0.0-rc1)" on Linux Mint 18.2, trying to connect to an NLA enforced windows endpoint. Command line is:
xfreerdp /f /sec-ext /sec-tls /sec-nla /u:<username> /v:
I'm also getting:
[12:35:52:582] [16099:16100] [ERROR][com.freerdp.core] - freerdp_set_last_error ERRCONNECT_PASSWORD_CERTAINLY_EXPIRED [0x0002000F]
[12:35:52:582] [16099:16100] [ERROR][com.freerdp.core.transport] - BIO_read returned an error: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
[12:35:52:582] [16099:16100] [ERROR][com.freerdp.client.x11] - Freerdp connect error exit status 1
Any help would be greatly appreciated.

@tmunro55 update, that version does not have the patches

No idea, the patched version is in debian, but others must pick it up themselves.
You can use our nightly builds or the remmina ppa for up to date versions

OK Thanks.

Could not find a FreeRDP that would work. I did however install Remmina and it's working very nicely. I also like the target machine management features. Guess I'm a convert.
Thanks for your help.

I second @yan12125, I have similar issue with the package installed Debian Buster. It was working normally with Debian Stretch a month ago.
My trace is pretty much same with the one above:
$ WLOG_LEVEL=DEBUG remmina
StatusNotifier/Appindicator support: not supported by desktop. libappindicator will try to fallback to GtkStatusIcon/xembed
Running under Gnome Shell version 3.30.1

(org.remmina.Remmina:20508): Gtk-WARNING **: 10:21:49.395: gtk_menu_attach_to_widget(): menu already attached to GtkMenuItem
[10:21:50:176] [20508:20513] [DEBUG][com.freerdp.channels.cliprdr.client] - VirtualChannelEntryEx
[10:21:50:176] [20508:20513] [INFO][com.freerdp.client.common.cmdline] - loading channelEx cliprdr
[10:21:50:176] [20508:20513] [DEBUG][com.freerdp.channels.drdynvc.client] - VirtualChannelEntryEx
[10:21:50:176] [20508:20513] [INFO][com.freerdp.client.common.cmdline] - loading channelEx drdynvc
[10:21:50:180] [20508:20513] [DEBUG][com.freerdp.core.nego] - Enabling security layer negotiation: TRUE
[10:21:50:180] [20508:20513] [DEBUG][com.freerdp.core.nego] - Enabling restricted admin mode: FALSE
[10:21:50:180] [20508:20513] [DEBUG][com.freerdp.core.nego] - Enabling RDP security: TRUE
[10:21:50:180] [20508:20513] [DEBUG][com.freerdp.core.nego] - Enabling TLS security: TRUE
[10:21:50:180] [20508:20513] [DEBUG][com.freerdp.core.nego] - Enabling NLA security: TRUE
[10:21:50:180] [20508:20513] [DEBUG][com.freerdp.core.nego] - Enabling NLA extended security: FALSE
[10:21:50:180] [20508:20513] [DEBUG][com.freerdp.core.nego] - state: NEGO_STATE_NLA
[10:21:50:180] [20508:20513] [DEBUG][com.freerdp.core.nego] - Attempting NLA security
[10:21:50:180] [20508:20513] [DEBUG][com.freerdp.core] - connecting to peer ((my_ip))
[10:21:51:194] [20508:20513] [DEBUG][com.freerdp.core.nego] - RequestedProtocols: 3
[10:21:51:210] [20508:20513] [DEBUG][com.freerdp.core.nego] - RDP_NEG_RSP
[10:21:51:210] [20508:20513] [DEBUG][com.freerdp.core.nego] - selected_protocol: 2
[10:21:51:210] [20508:20513] [DEBUG][com.freerdp.core.nego] - state: NEGO_STATE_FINAL
[10:21:51:210] [20508:20513] [DEBUG][com.freerdp.core.nego] - Negotiated NLA security
[10:21:51:210] [20508:20513] [DEBUG][com.freerdp.core.nego] - nego_security_connect with PROTOCOL_NLA
[10:21:51:241] [20508:20513] [DEBUG][com.winpr.utils] - Could not open SAM file!
[10:21:55:307] [20508:20513] [DEBUG][com.winpr.sspi] - InitSecurityInterfaceExA
[10:21:55:307] [20508:20513] [DEBUG][com.freerdp.core.nla] - nla_client_init 349 : packageName=Negotiate ; cbMaxToken=12256
[10:21:55:308] [20508:20513] [DEBUG][com.freerdp.core.nla] - Sending Authentication Token
((similarly some hexdump starting with NTLMSSP...))
[10:21:55:324] [20508:20513] [DEBUG][com.freerdp.core.nla] - CredSSP protocol support 6, peer supports 5
[10:21:55:324] [20508:20513] [DEBUG][com.freerdp.core.nla] - Sending Authentication Token
((similarly some hexdump starting with NTLMSSP...))
[10:21:55:340] [20508:20513] [ERROR][com.freerdp.core] - freerdp_set_last_error ERRCONNECT_PASSWORD_CERTAINLY_EXPIRED [0x0002000F]
[10:21:55:340] [20508:20513] [ERROR][com.freerdp.core.transport] - BIO_read returned an error: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
[10:21:55:340] [20508:20513] [DEBUG][com.freerdp.core.transport] - transport_check_fds: transport_read_pdu() - -1
[10:21:55:340] [20508:20513] [DEBUG][com.freerdp.core.rdp] - transport_check_fds() - -1
libfreerdp returned code is 0002000F

$ dpkg -l | grep freerdp

ii  libfreerdp-client2-2:amd64             2.0.0~git20181120.1.e21b72c95+dfsg1-1 amd64        Free Remote Desktop Protocol library (client library)
ii  libfreerdp2-2:amd64                    2.0.0~git20181120.1.e21b72c95+dfsg1-1 amd64        Free Remote Desktop Protocol library (core library)

$ dpkg -l | grep remmina

ii  remmina                                <IP_ADDRESS>+dfsg-1                       amd64        GTK+ Remote Desktop Client
ii  remmina-common                         <IP_ADDRESS>+dfsg-1                       all          Common files for Remmina
ii  remmina-plugin-rdp:amd64               <IP_ADDRESS>+dfsg-1                       amd64        RDP plugin for Remmina
ii  remmina-plugin-secret:amd64            <IP_ADDRESS>+dfsg-1                       amd64        Secret plugin for Remmina
ii  remmina-plugin-vnc:amd64               <IP_ADDRESS>+dfsg-1                       amd64        VNC plugin for Remmina

@bmiklautz I will be able to check it when I have physical access to the host in a few hours.
In KB4480970, it is noted this issue is later resolved by KB4487345. Will check both and post here.

Thanks. Installing KB4487345 let me authenticate via NLA again.
Interestingly, sec-tls continued to work, but only connected to the user chooser, which then handled the authentication successfully, while sec-nla directly logs the provided user in.
rdesktop worked for me even without KB4487345, though, which sounds odd. Maybe there's still a bug in FreeRDP?

Just to let people know, I'm connecting Linux Mint 19.0 to a fully patch tightly secured (via Group Policy, I have no control over it) Windows 10 machine. I've cloned compiled and deployed FreeRDP 2.0.0-dev5 (2693389a1) and I'm using remmina as a front end. Security is set to NLA. It's working correctly. Once again a happy camper.

Sorry for the late respones - was on Chinese New Year vacation last week :)
I can also confirm KB4487345 fixes the issue!


[Bug] Finish CleanupJob early if the job is suspended.

What this PR does / why we need it:
To fix the bug related to the situation when the job was both suspendedandrunPolicy.ttlSecondsAfterFinished` was set.
In such situation CleanupJob was returning an error and activate status of the replicas couldn't be removed.
Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):
Fixes #2239
Checklist:

[ ] Docs included if any changes are user facing

cc @tenzen-y

/ok-to-test


Connect-SqlInstance

@wsmelton can you see if this works for you? I don't expect it to but I'm desperate. I cannot get the other way to work.

Work for what?

Not failing logins

yessssssssssss


Processing API: Accept messages

Functions like finish and create_message_two currently take messages as bytes.
Typical usage is that the application needs to decode the message beforehand anyway -- in the m1 case to pick out method, correlation and supported suites (to pick suitable own credentials), and in the m3 case to get the c_r to find the right responder.
Given that, I suggest these should take the decoded message instead. (For compatibility or the cases where things are hardcoded, there may stay an option to pass in bytes too, but for consistency it's probably better to always make the application do the decoding).
(This is a bit of a note-to-self as I don't want to rewrite the API while I have other things in the air; can provide a PR for this at a later stage).

Hi @chrysn, so far I've neglected the case where there could be multiple exchanges going on at the same time. This is why I took in the received message as bytes and decoded everything inside the API calls (create_message_two, create_message_three, ...). Just to be clear are you suggesting something like this:

application decodes CBOR sequence and extracts connection identifier (if applicable) and authentication method (for message 1)
It passes to the EDHOC engine:

an EDHOC processing context (which it has fetched with the connection identifier or other connection identifying information such as the CoAP token or five tuple)
the decoded CBOR sequence (for example as a list of decoded CBOR elements)
and the credentials it has selected (based on authentication method in message 1)

Not exactly,

application decodes CBOR sequence and extracts connection identifier (if applicable) and authentication method (for message 1)

application turns data into the appropriate message (eg.

m1 = messages.MessageOne.decode(request.payload))

With the initial null addition, there may become a helper function to
decide whether it's m1 or m3, or it looks at the stream on its own, or
MessageOne.decode becomes particularly fallible.
Somewhere inbetween it picks a few pieces out of message 1 (method,
supported algorithms; also factoring in data like the Uri-Host in the
CoAP case), and picks an C_R to assign (based on multiple
considerations, one of them being which exchanges are active, another
being which OSCORE IDs are currently being used).

It passes to the EDHOC engine:

it passes that message to the engine:

- msg_2 = resp.create_message_two(request.payload)
+ msg_2 = resp.create_message_two(m1)

I'd try to keep the details of which responders are around out of the
library, there are too many considerations in there (see above). Then
it only becomes a matter of feeding messages to the one created object.


Since version 0.45.18 docker container crashes with "Exec Format Error"

Describe the bug
As per title, since version 0.45.18 (included), when I start the changedetection docker container on my x86 machine I get "exec format error"
Version
0.45.18 , 0.45.19 , 0.45.20
To Reproduce

Run a docker compose file with changedetection version 0.45.18+

Expected behavior
Container running normally
Desktop (please complete the following information):

OS: Debian GNU/Linux 12 (bookworm)

Logs
changedetection  | exec /usr/local/bin/python: exec format error
changedetection  | exec /usr/local/bin/python: exec format error
changedetection  | exec /usr/local/bin/python: exec format error
changedetection  | exec /usr/local/bin/python: exec format error
changedetection  | exec /usr/local/bin/python: exec format error

Could be related to #2328

yeah definitely a duplicate

please write what CPU exactly


1.0.2: Enum is not provided correctly with Swagger 1.2 API

1.0.2
It seems there is a problem with Enums when generating from API's of Swagger 1.2.
@ApiModel(value="User", description="User object")
public class User {
....
    @ApiModelProperty(value = "State", required = false, position = 3)
    private State state;

@ApiModel(value="State", description="State object")
public enum State {

	ACTIVE, DISABLED;

}

State Enum definition in api-docs:
"state":{"enum":["ACTIVE","DISABLED"],"description":"State","required":false,"type":"State"
full api-docs listing:
{"apiVersion":"1.0","apis":[{"description":"saveUser","operations":[{"method":"POST","summary":"create or update a user name by id","notes":"saveUser","nickname":"saveUser","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"id","name":"id","paramType":"query","format":"int64","type":"integer","required":true},{"allowMultiple":false,"defaultValue":"","description":"name","name":"name","paramType":"query","type":"string","required":true}],"responseMessages":[{"code":200,"message":"User has been updated","responseModel":"User"}],"deprecated":"false","type":"User"}],"path":"/user"},{"description":"getUser","operations":[{"method":"GET","summary":"read User by ID","notes":"pass ID to read user","nickname":"getUser","produces":["*/*"],"consumes":["application/json"],"parameters":[{"allowMultiple":false,"defaultValue":"","description":"id","name":"id","paramType":"query","format":"int64","type":"integer","required":true}],"responseMessages":[{"code":200,"message":"Successful retrieval of user detail","responseModel":"User"},{"code":404,"message":"User not found","responseModel":"Void"}],"deprecated":"false","type":"User"}],"path":"/user"}],"basePath":"/","consumes":["application/json"],"models":{"User":{"description":"User object","id":"User","properties":{"id":{"description":"ID of the user","required":true,"format":"int64","type":"integer"},"locations":{"items":{"type":"Location"},"required":false,"type":"array"},"name":{"description":"Name of the user","required":true,"type":"string"},"state":{"enum":["ACTIVE","DISABLED"],"description":"State","required":false,"type":"State"},"categories":{"items":{"type":"Category"},"required":false,"type":"array"}}},"Category":{"description":"","id":"Category","properties":{"id":{"required":false,"format":"int64","type":"integer"},"name":{"required":false,"type":"string"}}},"Location":{"description":"","id":"Location","properties":{"zip":{"required":false,"type":"string"},"street":{"required":false,"type":"string"},"longitude":{"required":false,"format":"double","type":"number"},"latitude":{"required":false,"format":"double","type":"number"},"country":{"required":false,"type":"string"},"city":{"required":false,"type":"string"}}}},"produces":["*/*"],"resourcePath":"/user","swaggerVersion":"1.2"}

generated code with Swagger-codegen:
@ApiModel(description = "User object")
public class User  {

  private Long id = null;
  private String name = null;
  private State state = null;

I first thought this is a bug in Swagger-Codegen, but was advised this is not the case:
https://github.com/swagger-api/swagger-codegen/issues/621#issuecomment-91869640

@jfiala this is a grey area where bugs and user errors meet. The issue here is that the model is over annotated. You need remove the @ApiModel#value on the State enum.
As a library we prefer the actual source of truth to the annotation based approach. Unless you really need to override some behavior or fill in the gap between just plain spring based inference and the spec, e.g. decsriptions etc. use annotations sparingly. The stand the library takes is if you annotate something you must be knowing what you're doing.
Also you'll find the same behavior in 2.x. I'm closing this as a won't fix.

After changing to:
@ApiModelProperty(value = "ID of the user", required = true, position = 2)
    private long id;

@ApiModelProperty(required = false, position = 3)
    private State state;

the api-docs change to:
"state":{"enum":["ACTIVE","DISABLED"],"description":"","required":false,"type":"string"}
and the generated code to:
public enum StateEnum {
     ACTIVE,  DISABLED,
  };
  private StateEnum state = null;

Great!
I was just wondering, because at @ApiModelProperty there is a value / notes attribute, which is both rendered in the swagger-API-Client as description:
e.g. with the id-attribute:
"id":{"description":"ID of the user","required":true,"format":"int64","type":"integer"}
So it seems right now the value-attribute is treated as description for Long/String (non-enum types).
However, as you pointed out, the value-attribute should not be used for comments.
If I use notes-attribute instead, everything is working fine.


Handle backwards compatible file writing

Say that the library supports version 1.2.0 of a particular schema. There is already support for reading a file that uses earlier versions of that schema. By default, if we modify that file and write it back out, it will be written out with the latest version of the schema (i.e. 1.2.0). However, the asdf-standard documentation suggests that it would be useful to preserve the original schema when writing.
First of all, does this actually make sense? Do we really want to support this kind of backwards compatibility? In my opinion, support for backwards compatible writes should not be mandatory, but should be possible to support if desirable.
If (optional) support is reasonable and desirable, how should it be implemented? Currently there doesn't seem to be a good way to do this. However, the addition of the supported_versions attribute and associated machinery does allow tag classes to be version-aware. Maybe this can be leveraged to provide a similar functionality.

My initial reaction is to say no. The only real use case I can think of..OK, the only two use cases...among the many...too silly. 1) The user has some home cooked code that only supports the older version. I doubt we want to encourage this. 2) Some operational system is using and older library and they can't upgrade for some reason, and others are manipulating data files for reinsertion into that system using newer libraries. This is a stronger case, but I think we should hold of on this until someone gives it as a good reason. We can think about how we do this I suppose, but not implement it. So some discussion of the approach may be worthwile.


Enable configuration support for Google.Cloud.Diagnostics.AspNetCore

When using the Google.Cloud.Diagnostics.AspNetCore.GoogleDiagnosticsWebHostBuilderExtensions.UseGoogleDiagnostics extension, there is an assumption that the Google Cloud project ID is hardcoded. This is seen in the examples:
string projectId = "[Google Cloud Platform project ID]";
var webHost = new WebHostBuilder()
    .UseGoogleDiagnostics(projectId)
    .UseStartup<Startup>()
    .Build();

Looking at the extension, it appears this roughly boils down to a call to IWebHostBuilder.ConfigureServices(Action<IServiceCollection>) where several things get registered with DI.
There is another overload IWebHostBuilder.ConfigureServices(Action<WebHostBuilderContext, IServiceCollection>) where the web host can provide configuration for the app via WebHostBuilderContext.Configuration. This allows configuration to be set up then passed in to drive later registrations.
It would be helpful if there was a way to use this overload to avoid having to set up configuration multiple times (one for use in GCP calls, one for the actual app) and avoid hard coding.
For example, something like this:
public static IWebHostBuilder UseGoogleDiagnostics(this IWebHostBuilder builder, string projectIdKey = null, string serviceNameKey = null, string serviceVersionKey = null)
{
  builder.ConfigureServices((context, services) =>
  {
    var projectId = projectIdKey == null ? null : context.Configuration[projectIdKey];
    var serviceName = serviceNameKey == null ? null : context.Configuration[serviceNameKey];
    var serviceVersion = serviceVersionKey == null ? null : context.Configuration[serviceVersionKey];
    // then register the stuff as usual.
  }

  return builder;
}

A workaround would be to allow the GoogleDiagnosticsStartupFilter class to be public so folks could effectively write this overload as an app-specific extension. Unfortunately, with the GoogleDiagnosticsStartupFilter being internal, one can't actually write a custom version of the extension in a very clean fashion.

CC: @henkmollema who did the initial work here.

The intention behind this extension method is to retrieve the project ID (and service name/version) from the GCP resource where the application is deployed to. Calling UseGoogleDiagnostics() without parameters will just work when deployed to Google Cloud. Specifying the values explicitly is merely for testing and overriding. At least, that was my intention.
I wonder what your scenario is that requires a dynamic or configurable project ID. Is it some kind of multi-tenant app?
Another way is to fall back to configuring the diagnostic services (logging, error reporting and tracing) individually:
builder.ConfigureServices((context, services) =>
{
    // Populate from context.Configuration
    services.AddGoogleExceptionLogging(options =>
    {
        options.ProjectId = projectId;
        options.ServiceName = serviceName;
        options.Version = version;
    });
}

And a question: how would your proposed overload play with the existing one?
UseGoogleDiagnostics(this IWebHostBuilder builder, string projectId = null, string serviceName = null, string serviceVersion = null)

If you add a config key parameter for project ID, service name and service it might become confusing

I'm really just getting started trying to use this and found that having something hardcoded isn't great. We have a diverse set of teams with more than one cloud project, so each team being able to override what the dev/test project is has value. Especially as we try to create some boilerplate app setup libraries that get shared across teams.
We are working on a system that is primarily a set of SaaS microservices, but larger customers can opt to deploy the services to their own cloud account. Still working out the kinks, trying to ensure that we can support that as we prove it out. Services are hosted in Kubernetes, so I'm not totally sure where "service name" or "service version" will be coming from in that scenario. Pod name? Deployment name? In any case, being able to control that is valuable.
I absolutely can configure all of that individually and that's effectively what I'm falling back to now with the current setup. It just seemed like a fairly easy thing to enable that might add value.
Apologies if the overload I posted wasn't entirely clear. It was a suggestion/idea rather than a pull request. Something to build on. Thinking more about it, maybe something more like this would be feasible:
public static IWebHostBuilder UseConfiguredGoogleDiagnostics(this IWebHostBuilder builder, string projectConfigurationKey = "google")
{
  builder.ConfigureServices((context, services) =>
  {
    var projectId = context.Configuration[$"{projectConfigurationKey}:project"];
    var serviceName = context.Configuration[$"{projectConfigurationKey}:serviceName"];
    var serviceVersion = context.Configuration[$"{projectConfigurationKey}:serviceVersion"];
    // then register the stuff as usual.
  }

  return builder;
}

In this case...

A different name disambiguates the method overloads to avoid clashing and clarify intention.
Only a root configuration key is required and the child keys under that are assumed. This is a precedent seen with the Microsoft.Extensions.Logging configuration where you can provide a root log configuration key but the child keys are assumed and not changeable.

Granted, the approach where each configuration key is provided individually would also work in combination with the updated method name; this would just provide some defaults so technically you could do UseConfiguredGoogleDiagnostics() with appSettings.json like:
{
  "google": {
    "project": "abcd-123456",
    "serviceName": "my-microservice",
    "serviceVersion": "1.2.3"
  }
}

That should, with the default web host builder, "just work." I'm working on a local version of pretty much this exact thing. The stumbling block is that I'll have to make my own GoogleDiagnosticsStartupFilter to allow things to be registered from the web host level (like UseGoogleDiagnostics()) without sprinkling code throughout the app startup as well.
Does that help clarify? Am I off base in my thinking somewhere?

I think part of what I'm running into is that I'm not running on Google App Engine. It appears that's the only platform that does allow the simple call to UseGoogleDiagnostics() to just work.
With UseGoogleDiagnostics() the project name, service name, and service version are retrieved by passing a null instance of MonitoredResource to various methods on the Project class that retrieve data from the running app.
The methods on the Project class look for properties based on what's available in the current platform:

GetAndCheckProjectId looks for the project_id property.
GetAndCheckServiceName looks for the module_id property.
GetAndCheckServiceVersion looks for the version_id property.

If any of these is not supplied, it falls back to creating a MonitoredResource based on the current platform. If the value still isn't supplied, you get an exception.
The only platform type in MonitoredResource that supplies all three project_id, module_id, and version_id is Google App Engine.

PlatformType
project_id
module_id
version_id

PlatformType.Unknown
❌
❌
❌

PlatformType.Gce
✔
❌
❌

PlatformType.Gae
✔
✔
✔

PlatformType.Gke
✔
❌
❌

So if I'm in a VM (GCE) or in Kubernetes (GKE) I have to provide data myself. Which isn't a big deal, to be sure, but means it'll happen whether it's in development or not, making configuration somewhat interesting.

@tilling I'll get a look at this and get back on this thread

@tillig I've been looking at the code and both yours and @henkmollema's comments, and here are some comments of my own:

The UseGoogleDiagnostics() extension method was meant as a helper method for configuring all of Diagnostics at once and cleanly when either running on GAE or running on GCE/GKE and having fixed (hardcoded) serviceName and version or running outside of Google Cloud and having projectID, serviceName and version fixed.
As @henkmollema recommended, you can always fallback to configuring each of the 3 services individually on the Startup class where you have access to the Configuration property.
This is definitely not clear in the docs, I will submit a PR to update the docs.
I also definitely see the advantage of having a more general extension method for configuring all in one go that works no matter where the application is running or whether some logic is required to obtain the three values.
I think that assuming the values will always be stored in appSettings.json, although very reasonable, might not be general enough.
What about something like:

public static IWebHostBuilder UseGoogleDiagnostics(
    this IWebHostBuilder builder,
    Func<WebHostBuilderContext, string> projectIdGetter = null,
    Func<WebHostBuilderContext, string> serviceNameGetter = null,
    Func<WebHostBuilderContext, string> versionGetter = null)

If you are happy to work on a PR like that, I'm more than happy to review and help with it.
Else, I might be able to work on it, but need to confirm with the team first and probably can't guarantee an ETA.
And one last alternative, can't you pass the serviceName and version values as command line arguments and use them from there?

I think the proposed overload is fine. Flexible enough to get the information from different places if needed; easy enough to wrap with a more convenient call with custom code.
I am working through the legal portion of getting the CLA signed. After I have that done I'd be happy to work on the PR for that.
Ostensibly I could get the values from command line args, the environment, or anywhere. We end up rolling all that together in IConfiguration anyway. I just need the flexibility to provide the values from a variety of sources (JSON config, XML config, environment, command line, whatever) and having the ability to do all that work in one pipeline as the web host is built is valuable. The work is already being done to assemble the config, why not use it?
But, like I said, I'm happy to just own our convenience method, the minimum I need is the GoogleDiagnosticsStartupFilter to be public so I can use it.
I'll keep you posted on the CLA.

I haven't abandoned this, just still working through legal. Sorry for the delay.

No worries, and thanks for the update.

Closed via #2741 . We'll be releasing probably by the end of next week.

@tillig This is now included in release 3.0.0-beta08. Thanks!

@amanda-tarafa @tillig this new overload breaks usages of the method without parameters, e.g.:
builder.UseGoogleDiagnostics();

With the following error message:
The call is ambiguous between the following methods or properties:
'GoogleDiagnosticsWebHostBuilderExtensions.UseGoogleDiagnostics(IWebHostBuilder, string, string, string)'
and
'GoogleDiagnosticsWebHostBuilderExtensions.UseGoogleDiagnostics(IWebHostBuilder, Func<WebHostBuilderContext, string>, Func<WebHostBuilderContext, string>, Func<WebHostBuilderContext, string>)'

It can be fixed by choosing explicitly for one or another overload, e.g. builder.UseGoogleDiagnostics(projectId: null);.  I do think that's pretty unfortunate though. Is there any way to fix this?

Let me take a closer look at that. I'll updata here.

@henkmollema @tillig This effectively inroduced a breaking change as described by @henkmollema comment. Sorry I missed that during review.
So, three options I can think of to fix this:

Rename the offending overload to something like UseGoogleDiagnosticsFromContext.
Have the parameters in the offending overload not be optional. Them being optional is just a matter of comfort in that when wanting some of these values to be null, i.e. projectId, the user doesn't need to pass a projectIdGetter, but functionally, that would be the same as to pass a projectIdGetter that returns null.
Something more complex albeit more general, like defining an interface IGoogleDiagnosticsConfig that would have properties for ProjectId, ServiceName, ServiceVersion. And then the offending overload would turn into UseGoogleDiagnostics(this IWebHostBuilder builder, Func<WebHostBuilderContext, IGoogleDiagnosticConfig> configGetter). This would also allow for other implementations of IGoogleDiagnosticsConfig that would obtain the values from other places.

I would go for number 3. It's just a little more work but it will give us flexibility in the future in case we need to add either other configuration parameters or other ways to obtain the configuration paramaters.
Let me know what you think, if this would be usefull for you etc. And I will submit the PR.
@jskeet if you could chime in as well that'd be great.

Either option 2 or 3 seems fine.
Regarding Func<WebHostBuilderContext, IGoogleDiagnosticConfig> of option 3: did you mean for the consumer to return an instance of IGoogleDiagnosticConfig, or did you mean to use Action<WebHostBuilderContext, IGoogleDiagnosticConfig> so the consumer gets an instance of  IGoogleDiagnosticConfig which they can populate with values using WebHostBuilderContext?

I think the "make the parameters required" is the way I'd prefer here.

@henkmollema I meant for Func<WebHostBuilderContext, IGoogleDiagnosticConfig>, the method implementation would look like this:
        public static IWebHostBuilder UseGoogleDiagnostics(this IWebHostBuilder builder, Func<WebHostBuilderContext, IGoogleDiagnosticConfig> configGetter)
        {
            builder.ConfigureServices((context, services) =>
            {
                var config = configGetter(context);
                ConfigureGoogleDiagnosticsServices(services, config.ProjectId, config.ServiceName, config.ServiceVersion, null);
            });

            return builder;
        }

I'll be submitting option number 2 then, we can revisit number 3 in the future if we really need it.

I have submitted #2900. Take a look and feel free to leave comments.

Closed via #2900 . Will update here when this is released.

The fix for the breaking change is now released in 3.0.0-beta09.


如何在vue-next中正确的安装 vue-router-next（how to install vue-router-next in vue-next）?

What problem does this feature solve?
i want use this package in vue-next
What does the proposed API look like?
npm i vue-router-next -D

See the playground while the documentation is in progress: https://github.com/vuejs/vue-router-next/blob/master/playground/main.ts#L23


global variables are forbidden in strict mode, but they exists on rasterize.js

it seems "strict mode" enabled ~2 months ago with https://github.com/ariya/phantomjs/commit/9ac8cccf0abd7e2675d943d690fab0631b9a68bd#diff-b1bce6d16bf409f61061d23b1850eb43R1
But, we still have some global variables in rasterize.js.
Such command gives error below
$ phantomjs phantomjs/examples/rasterize.js http://google.com output.png 1300px*1000px
ReferenceError: Strict mode forbids implicit creation of global property 'pageWidth'

  phantomjs://code/rasterize.js:23 in global code

Fixed in https://github.com/ariya/phantomjs/commit/0ba7bc8ef6867ff335402e9b58ae8558ca8a54d9


Efficient Entity Queries

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x] Support request
[ ] Other... Please describe:

What is the most efficient way to select all entities in a store in such a way that if one entity's data changes, only that entity's data will be pushed through the pipe (Akita selector/query)?
I've seen that this.selectAll() uses combineLatest so that if one entity's data changes, all the entities are pushed through the pipe. This is not an efficient solution since I only want a single subscription for each entity that will not be affected by other entities.
A potential solution I have experimented with is:
this.query
      .select(s => s.ids)
      .pipe(
        switchMap(ids => from(ids)),
        mergeMap(id => this.query.selectEntity(id)),
        ...

This works well until another entity is added/removed from the store and then the array of ids are pushed though the pipe which then triggers all entities to be reselected.
Is there a way that I can create a query such that it creates a single subscription for each entity and will never reselect a pre-existing entity if another entity is added or another entity's data changes?

What is the most efficient way to select all entities in a store in such a way that if one entity's data changes, only that entity's data will be pushed through the pipe

Do you mean something like:
selectAll().subscribe((data) => {
  data should be the only entity that has been changed?
})

Yes, something like that. I have an application that I want to be performant since it is using a graphics library and I do not want to redraw each item/entity when another entity's data changes or the store adds/removes an entity.

So use Entity actions and listen to update.

I was just looking at! I've been using Akita for about 5 months now and this is the first performance-intensive application that I am doing with it so the EntityActions are new to me but it looks like exactly what I need.
Thank you!!! And awesome work with everything!!

No problem. Thanks. Closing for now.


Over Riding Laradrops Controller still calls Laradrops Controller

I have made a new controller like this
<?php

use Jasekz\Laradrop\Http\Controllers\LaradropController;
use Input, Auth;

class UserMediaController extends LaradropController {

    /**
     * Upload and store new file.
     *
     * @return JsonResponse
     */
    public function store()
    {
        try {

            if (! Request::hasFile('file')) {
                throw new Exception(trans('err.fileNotProvided'));
            }

            if( ! Request::file('file')->isValid()) {
                throw new Exception(trans('err.invalidFile'));
            }

            /*
             * move file to temp location
             */
            $fileExt = Input::file('file')->getClientOriginalExtension();
            $fileName = str_replace('.' . $fileExt, '', Input::file('file')->getClientOriginalName()) . '-' . date('Ymdhis');
            $mimeType = Request::file('file')->getMimeType();
            $tmpStorage = storage_path();
            $movedFileName = $fileName . '.' . $fileExt;
            $fileSize = Input::file('file')->getSize();

            if($fileSize > ( (int) config('laradrop.max_upload_size') * 1000000) ) {
                throw new Exception(trans('err.invalidFileSize'));
            }

            Request::file('file')->move($tmpStorage, $movedFileName);

            $disk = Storage::disk(config('laradrop.disk'));

            /*
             * create thumbnail if needed
             */
            $fileData['has_thumbnail'] = 0;
            if ($fileSize <= ( (int) config('laradrop.max_thumbnail_size') * 1000000) && in_array($fileExt, ['jpg', 'jpeg', 'png', 'gif'])) {

                $thumbDims = config('laradrop.thumb_dimensions');
                $img = Image::make($tmpStorage . '/' . $movedFileName);
                $img->resize($thumbDims['width'], $thumbDims['height']);
                $img->save($tmpStorage . '/_thumb_' . $movedFileName);

                // move thumbnail to final location
                $disk->put('_thumb_' . $movedFileName, fopen($tmpStorage . '/_thumb_' . $movedFileName, 'r+'));
                File::delete($tmpStorage . '/_thumb_' . $movedFileName);
                $fileData['has_thumbnail'] = 1;

            }

            /*
             * move uploaded file to final location
             */
            $disk->put($movedFileName, fopen($tmpStorage . '/' . $movedFileName, 'r+'));
            File::delete($tmpStorage . '/' . $movedFileName);

            /*
             * save in db
             */

            if (!Auth::user()->currentTeam()){
            $eitherTeamOrUser = \Auth::user()->finduser;
            }

            elseif(Auth::user()->currentTeam()){
                $eitherTeamOrUser = \Auth::user()->currentTeam()->findteam;
            }
            $fileData['findimage'] = 1;
            $fileData['filename'] = $movedFileName;
            $fileData['alias'] = Input::file('file')->getClientOriginalName();
            $fileData['public_resource_url'] = config('laradrop.disk_public_url') . '/' . $movedFileName;
            $fileData['type'] = $fileExt;
            if(Input::get('pid') > 0) {
                $fileData['parent_id'] = Input::get('pid');
            }
            $meta = $disk->getDriver()->getAdapter()->getMetaData($movedFileName);
            $meta['disk'] = config('laradrop.disk');
            $fileData['meta'] = json_encode($meta);
            $file = $this->file->create($fileData);

            /*
             * fire 'file uploaded' event
             */
            event(new FileWasUploaded([
                'file'     => $file,
                'postData' => Input::all()
            ]));

            return $file;

        }

        catch (Exception $e) {

            // delete the file(s)
            if( isset($disk) && $disk) {
                $disk->delete($movedFileName);
                $disk->delete('_thumb_' . $movedFileName);
            }

            return $this->handleError($e);
        }
    }

    }

Basically, I am trying to override the store method to add a findimage column in the DB. I have altered the migration made the above controller. I cannot get Auth::user() it always returns null if I make it directly in the laradropController, So I am trying to override it to have that function available to me.
 if (!Auth::user()->currentTeam()){
            $eitherTeamOrUser = \Auth::user()->finduser;
            }

            elseif(Auth::user()->currentTeam()){
                $eitherTeamOrUser = \Auth::user()->currentTeam()->findteam;
            }
            $fileData['findimage'] = 1;

But this does not overwrite the laradropsController.
I have added these routes
//User Media Files
Route::get('mediaIndex', 'UserMediaController@index');
Route::post('mediaStore', 'UserMediaController@store');
Route::post('mediaDestroy', 'UserMediaController@destroy');
Route::post('mediaMove', 'UserMediaController@move');
Route::post('mediaCreate', 'UserMediaController@create');

And instantiate the laradrops like this

Any idea why it doesnt hit my new controller?

Hey Devin,
Thanks for bringing this to my attention.  The reason that this wasn't working for you, was because of a bug in the javascript file.  This is now fixed, if you want to update your code.  Alternatively, you can use the event handler method below if you don't feel like doing an update.  With that being said, here is how you can accomplish your goal:
EVENT HANDLER (preferred - this keeps your code nicely decoupled)

In your app/Providers/EventServiceProvider.php file, add a listener:

protected $listen = [
  'Jasekz\Laradrop\Events\FileWasUploaded' => [
    'App\Handlers\Events\LaradropFileWasUploaded',
  ],
];

Generate the handler with:
artisan handler:event 'App\Handlers\Events\LaradropFileWasUploaded' --event='Jasekz\Laradrop\Events\FileWasUploaded'

In the newly generated handler file - app/Handlers/Events/LaradropFileWasUploaded.php, change:
use App\Events\Jasekz\Laradrop\Events\FileWasUploaded
to
use Jasekz\Laradrop\Events\FileWasUploaded

In the handle() function, you can now access the uploaded file object and perform your business logic as needed.  For example:

public function handle(FileWasUploaded $event) {
  $file = $event->data['file'];
  $file->findimage = 3;
  $file->update();
}

CONTROLLER OVERRIDE METHOD

Create the controller (as you have), but you can skip all the laradrop code and just add your business logic.  The parent returns a file object you can utilize.  For example:

public function store() {
  try {
    $file = parent::store();
    $file->findimage = 1;
    $file->update();
  }
  catch (Exception $e) {
    return $this->handleError($e);
  }
}

Make sure your controller is name spaced correctly:
namespace App\Http\Controllers;
In your view, all you need is the upload handler.

I didn't get into the Auth::user() functionality because that's outside of the scope, but you should be able to use it in the normal Laravel way.  Let me know if this helps and/or if the issue persists.
Thanks,
Zig

Hi Zig and thanks for the response. I tried both methods and they seem to not be working. I would prefer the controller override method, as I can then get it to work as I need it, but I am still not hitting my controller.
I have this code below. My Goal is to assign findimage the users ID. So that I can collect only images assigned to that user. I do not want to use folders. Its one image per user.

This is where I instantiate my laradrop.
and my routes
//User Media Files
Route::get('mediaIndex', 'UserMediaController@index');
Route::post('mediaStore', 'UserMediaController@store');

But for some reason it is still not getting to that controller. I also want to crop and resize the image in the controller so over riding it would be my best option.
But am at a loss as to why this is not happening. New controller below
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Jasekz\Laradrop\Http\Controllers\LaradropController;
use Input, Auth;

class UserMediaController extends LaradropController {

    /**
     * Upload and store new file.
     *
     * @return JsonResponse
     */
    public function store()
    {

        if (!Auth::user()->currentTeam()){
            $eitherTeamOrUser = \Auth::user()->finduser;
        }

        elseif(Auth::user()->currentTeam()){
            $eitherTeamOrUser = \Auth::user()->currentTeam()->findteam;
        }

        try {
            $file = parent::store();
            $file->findimage = $eitherTeamOrUser;
            $file->update();
          }
          catch (Exception $e) {
            return $this->handleError($e);
          }

    }

Oh yes and this command php artisan handler:event 'App\Handlers\Events\LaradropFileWasUploaded' --event='Jasekz\Laradrop\Events\FileWasUploaded' isnt working for some reason. Am on 5.3

I'm testing this on 5.3 now and expect to have a solution for you shortly, but let me know if you find something before then.  Thanks for taking the time to work through this.

Try this:

Delete the  /public/vendor/jasekz directory.
Re-install the latest version of laradrop.
Re-run artisan vendor:publish

Let me know how it goes.

Hi Zig. It is wierd, am still not hitting my controller. I think the solution to my problem will be to create a trait for the images, then on successfull upload, send the image ID to my trait and just run a raw DB query to update this field in the Database, then return back the way you have it working. Am trying it out now. Such a rad package :D

Okay :D This is my final answer, yes I am sure, Lock it in! ;) Found best solution here https://laracasts.com/discuss/channels/general-discussion/l5-service-provider-for-sharing-view-variables

Ok, thanks, Dev.  Yeah, that's strange because I can get this to work as expected on my end.  I'll go ahead and close this out, but one more thing you may want to verify in your browser's network inspector, is that  when you do an upload, the ajax call actually goes to /mediaStore, and not /laradrop.  If it doesn't, it's most likely that you're running off of the old laradrop.js file.

Just a last bit of info regarding this.


Draft: feat octomind end to end tests

Description

Changelog

Checklist

[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] The light- and dark-theme are both supported and tested
[ ] The design was implemented and is responsive for all devices and screen sizes
[ ] The application was tested in the most commonly used browsers (e.g. Chrome, Firefox, Safari)

(Optional) Visual Changes


Feature/thumbnail snippets detail

This pull request provides basic functionality for #32 (keyword search, thumbnails and snippets on detail view)

Codecov Report

Merging #60 into develop will increase coverage by 0.04%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           develop     #60      +/-   ##
==========================================
+ Coverage    98.45%   98.5%   +0.04%
==========================================
  Files           39      39
  Lines         1946    2010      +64
==========================================
+ Hits          1916    1980      +64
  Misses          30      30

Impacted Files
Coverage Δ

ppa/archive/views.py
97.42% <100%> (+0.39%)
:arrow_up:

ppa/archive/tests/test_views.py
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Hot fix (reST parser does not consider the levels of sections)

Coverage remained the same at 91.007% when pulling a67933a53b0f1c83f58329fae817911ec3fe934c on takahi-i:rest-section-level into 8a0542e9a304cdaf403ee4cf9b405afc3e44207e on redpen-cc:master.


Unable to install Azure CLI

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command
apt-get update -y
apt-get install ca-certificates curl apt-transport-https lsb-release gnupg -y
curl -sL https://packages.microsoft.com/keys/microsoft.asc |
gpg --dearmor |
tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" |
tee /etc/apt/sources.list.d/azure-cli.list
apt-get update -y
apt-get install azure-cli -y
Describe the bug
Err:5 https://packages.microsoft.com/repos/azure-cli buster/main amd64 Packages
File has unexpected size (11552 != 11770). Mirror sync in progress? [IP: <IP_ADDRESS> 443]
Hashes of expected file:

Filesize:11770 [weak]
SHA512:d3712a63ce0d8aaa2067aa6003fa2052f691002a1faad809760d3c4ab01ea6571a3311b50351937b610fee3a8bde4c0973a019f97d7dfb836fb79b34a1a56fce
SHA256:09e44633d0bedb4d1702e6a4ec18150d7bc9a7084d37065f6a66706f7a7747eb
SHA1:2b3387f166da17078df2946ec425bbf60a0859d9 [weak]
MD5Sum:4d38699d75f06cec44a8f4934f298271 [weak]
Release file created at: Tue, 05 Jul 2022 03:16:01 +0000
Get:6 https://packages.microsoft.com/repos/azure-cli buster/main all Packages [11.6 kB]
Fetched 41.3 kB in 1s (66.1 kB/s)
Reading package lists... Done
E: Failed to fetch https://packages.microsoft.com/repos/azure-cli/dists/buster/main/binary-amd64/Packages.bz2  File has unexpected size (11552 != 11770). Mirror sync in progress? [IP: <IP_ADDRESS> 443]
Hashes of expected file:
- Filesize:11770 [weak]
- SHA512:d3712a63ce0d8aaa2067aa6003fa2052f691002a1faad809760d3c4ab01ea6571a3311b50351937b610fee3a8bde4c0973a019f97d7dfb836fb79b34a1a56fce
- SHA256:09e44633d0bedb4d1702e6a4ec18150d7bc9a7084d37065f6a66706f7a7747eb
- SHA1:2b3387f166da17078df2946ec425bbf60a0859d9 [weak]
- MD5Sum:4d38699d75f06cec44a8f4934f298271 [weak]
Release file created at: Tue, 05 Jul 2022 03:16:01 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

To Reproduce
try to install azure cli using steps in documentation
Expected behavior
azure cli is installed
Environment summary
script in Linux

We are also experiencing this!
It also happens when running inside of docker build.
From another IP <IP_ADDRESS>

It seems related to the release of  #22161

It seems related to the release of #22161

It is irrelevant.
We worked with Microsoft Linux Repo team to fix this issue. Please retry the installation and let us know if it is now working. Thanks.

This now works for me.
Great work.
If one finds similar issues with the https://packages.microsoft.com/repos/
What is the best way to notify the right team from outside, i.e. the Microsoft Linux Repo team, and where can one learn that kind of stuff?
I would imagine that @jiasli can't be this responsive all the time.

this is now working, thanks for the help


Remove web archive link to Ruby best practices

We run a link checker as part of linting the docs, and this link keeps causing it to fail by returning a 429. We don't want Google penalizing us for broken outbound links. From my understanding of the paragraph, we're mainly linking there to add legitimacy to our suggestion, but our suggestion provides the solution. If that's true, I don't think we need this link.
If I'm missing something, is there another resource we could link to or some information from that page we could pull into our docs?

(I've raised an escalation with TA to get a review)


AML Studio: Submit into new tab

It would be great to have a "Submit into new tab" button next to the "Submit" button. This should then open another tab in which there is the XML- and the Table View. These tabs could be colored according to the connection they came from. Add a tooltip to the tab for details.
See #5 for details.

Because tab management is difficult to get right, the tool now implements the ability to run a query in a new window which should achieve a similar effect.  Each window is colored based on the connection.  This was implemented in commit 9123222 which was release v2<IP_ADDRESS>7.


Delete Tag: Implementing Delete Tag

Ongoing PR.
Modifying delete to work on tags as well.
Eg:
delete t/word1 t/word2 t/word3

Coverage decreased (-0.9%) to 90.625% when pulling 4c7ea05ef045e71bf79f3179dcdb392be57bd4a4 on nbriannl:deleteTagRedo into 6a65441e37dc26c7205043891709d20d5abcccf5 on CS2103AUG2017-W09-B1:master.

Coverage decreased (-0.9%) to 90.625% when pulling 4c7ea05ef045e71bf79f3179dcdb392be57bd4a4 on nbriannl:deleteTagRedo into 6a65441e37dc26c7205043891709d20d5abcccf5 on CS2103AUG2017-W09-B1:master.

Coverage decreased (-0.9%) to 90.625% when pulling 332366b958884774a60d2c089981490085d97b39 on nbriannl:deleteTagRedo into 6a65441e37dc26c7205043891709d20d5abcccf5 on CS2103AUG2017-W09-B1:master.

Coverage increased (+0.4%) to 91.875% when pulling 8b15132643fd2509498a0f8480243d43bacb4c70 on nbriannl:deleteTagRedo into 6a65441e37dc26c7205043891709d20d5abcccf5 on CS2103AUG2017-W09-B1:master.

Coverage increased (+0.4%) to 91.875% when pulling 4548a5fc23625a6273a5f65defb27358f685ae78 on nbriannl:deleteTagRedo into 6a65441e37dc26c7205043891709d20d5abcccf5 on CS2103AUG2017-W09-B1:master.

Coverage increased (+0.3%) to 91.776% when pulling 81abaf02751a14aa0053756f1d3644ed69bd3547 on nbriannl:deleteTagRedo into e07b78f8d363d964f6dd8f75d07ab6d06a09b9ab on CS2103AUG2017-W09-B1:master.

Functionality complete.
Left some more tests in DeleteCommandParser and DeleteCommand.
Contemplating to refactor deleteTag method in Model to deleteTag(Set<Tag> setOfTags from deleteTag(Tag tag).

Coverage increased (+0.3%) to 91.776% when pulling 0ff045547687a53897939783ddd071118a22ea87 on nbriannl:deleteTagRedo into e07b78f8d363d964f6dd8f75d07ab6d06a09b9ab on CS2103AUG2017-W09-B1:master.

Coverage increased (+0.4%) to 91.915% when pulling cdde075b148305812e268eb44425b19ef99bf56f on nbriannl:deleteTagRedo into e07b78f8d363d964f6dd8f75d07ab6d06a09b9ab on CS2103AUG2017-W09-B1:master.

Coverage increased (+0.4%) to 91.94% when pulling 63e6a7f7667168eca05a2f6b5eaee0d20ec0396c on nbriannl:deleteTagRedo into 1c3f5362569fdb403739c3cbaa1e3316f3083715 on CS2103AUG2017-W09-B1:master.


Add an NRPE exporter to the Proxy

This involves listening on four more interfaces in order to
successfully get all of the jobs which may be YAML or JSON, and
the command names may either be a string or a dict. It's
documented, but not standardized.
Add a resource for nrpe_exporter, and check whether or not the
file is present on the host when a nrpe relation is joined. If it
isn't, then write it to the filesystem and create a systemd unit
to manage it.
on_stop, do the reverse -- remove the exporter binary and the
unit.
Adding the scrape config jobs requires some slight changes to
the MetricsEndpointAggregator to actually expose methods which
can be used by library users instead of trying to do everything
magically, as additional annotation are required, but duplicating
all of the logic from prometheus_scrape inside the NRPE library
does not make any sense versus creating partial structs which
can be exported

@rbarry82 I wonder if we could detect the situation of the actual subordinate missing. I am under the impression that the nrpe_exporter, by virtue of triggering the checks when it is in turn scraped, from the point of view of NRPE effectively is the same as a Nagios charm. So we probably should consider contributing to the nrpe charm to lift this limitation.

So, is go install github.com/RobustPerception/nrpe_exporter@latest enough, or do we need a patched version of the nrpe exporter?


Updated Image for Building on Success Issue# 273

I uploaded the image for Building on success

@Aini-Bashir Check this one now. I make a new pull request.


Make where must have files are more flexible

What about we give the user the choice to where the credentials.json and the token.pickle should be.
Instead of just making users have a .gdrive in their home directory, we could have something that allowed users to change that more easily than going into the code.
Maybe read from an environment variable and if it doesn't exist, we default it to what we have today.
This line here:
GDRIVE_PATH = join(HOME, '.gdrive')
We could have something like:
GDRIVE_PATH = os.getenv('GDRIVE_PATH') if os.getenv('GDRIVE_PATH') != null else join(HOME, '.gdrive')
ps: I have no idea if this code above works, it's just an example.
What do you think?

I think the flexibility suggested is good and I suggest we think about the approach that is most OS-agnostic. I'm not sure about how we would handle environment vars in Windows.
Alternatively, and I'm not necessarily saying it would be a better approach, we could have a config.yaml or config.json file pointing to the files, with default values. Config files could be changed by the script itself via some --set-config-dir parameter.
If we find out we could support os.getenv() seamlessly on Windows/MacOS/*nix, that's a good approach.

Flexibility is a good option. I like both ideas mentioned.
One thing to take note regarding the default values. I think we could have them stored in a folder inside the project itself. This way we could access them using a relative paths and not necessarily have to worry about differences between os.getenv() from all operating systems to figure out where the files are stored.
If the user wants to store them in a different folder however, we could have an option provided by the script to set a symlink between the default values and the value set by the user.
Also, if we ever intend to package the application and distribute it as an app the user could input the credentials.json to the app.

@CarlosRodrigo, having the configs in the user home allows for 1 binary -> N users, which would possibly be a common use case if the user installs the script in a system-wide location to be shared across multiple users.

@psteiger Hm.. good point. If we were to choose the project root solution, we would have to have a folder for each user that wants the app configured then..
But I think we can find a way to have multiple configurations and I think they should be in the project root.
I say that because for example: if I have more than one Google account where I use the drive for each account, what we have to do now is to have two token.pickle files where one is named differently and the other is named correctly so the program know which one to get. We could try to find a way to have multiple configurations for the app.
It would be like a 1 binary -> N configurations not even taking into considerations the amount of users. That means that an user could have multiple configurations.

Ok.
I like the idea of 1 project root binary and each user having his .gdrive folder in his $HOME, that's how most programs work, at least in *nix. If a user has N accounts, his own configuration can support it. E.g. his $HOME/.gdrive/config.json could have
{
<EMAIL_ADDRESS>{
      "a": 5,
      "c": 6
   },
<EMAIL_ADDRESS>{
      "a": 4,
      "c": 1
   }
}

Windows handles this in a similar fashion, e.g. Steam and AppData.

Great point again!
I agree with you and I now think we should have a config.json in $HOME.  We could extend this config.json for whatever configurations we need for the app.
{
   "download-chunksize": "X",
   "upload-chunksize": "Y",
   "configured-accounts": {
<EMAIL_ADDRESS>{
                "id": "1",
                "alias": "maybe?"
         }
   },
   "default-account": 1
}

Completely agree with the discussion so far in regards to configuration.
But, as for this .json file, it could be a little awkward during the process of pushing commits for devs and pulling updates for users.
Perhaps we could experiment with creating this .json on the first run of the app with the default values, adding it to .gitignore.
Or alternatively, use a dotenv file for the configuration, as git ignores it by default. The downside is that the user needs to rename the file, for example, .env-TEMPLATE to .env.

@jrcamelo , user config files should not be put on version control, indeed. If any, just a default json file on project root that would serve as basis for user config files generation, but maybe not even that: we could generate the json on runtime through code.


Parameter #1 $column of method Eloquent Builder where() fails with Illuminate\Contracts\Database\Query\Expression

Larastan Version: v2.5.1
Laravel Version: v10.8.0
--level used: 6
Pull request with failing test: N/A (private repo)

Description
Apologies if I'm just doing something wrong, but since I upgraded Larastan I seem to be getting this phpstan error.
 ------ --------------------------------------------------------------------------------------------------------------------------------------------
  Line   JsonApi/Filters/WhereDate.php
 ------ --------------------------------------------------------------------------------------------------------------------------------------------
  18     Parameter #1 $column of method Illuminate\Database\Eloquent\Builder<Illuminate\Database\Eloquent\Model>::where() expects array<int|string,
         mixed>|(Closure(Illuminate\Database\Eloquent\Builder): void)|(Closure(Illuminate\Database\Eloquent\Builder):
         Illuminate\Database\Eloquent\Builder)|Illuminate\Database\Query\Expression|string, Illuminate\Contracts\Database\Query\Expression given.

For context, I also upgraded Laravel 9 to 10 amongst other changes today. No failing tests, just these phpstan issues which weren't prevalent this morning.
Laravel code where the issue was found
app/JsonApi/Filters/WhereDate.php:
<?php

namespace App\JsonApi\Filters;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Facades\DB;
use LaravelJsonApi\Eloquent\Filters\Where;

class WhereDate extends Where
{
    /**
     * @param Builder $query
     * @param mixed $value
     */
    public function apply($query, $value): Builder
    {
        return $query->where(
            DB::raw('DATE(' . $this->column() . ')'), /** line 18 */
            $this->operator(),
            $this->deserialize($value)
        );
    }
}

DB::raw
According to the error, phpstan understands that DB::raw() returns an instance of \Illuminate\Contracts\Database\Query\Expression.
Just to confirm - as per vendor/laravel/framework/src/Illuminate/Support/Facades/DB.php, the method phpdoc is defined as such:
 * @method static \Illuminate\Contracts\Database\Query\Expression raw(mixed $value);

Builder::where
According to the error, phpstan is failing to understand that ->where() parameter #1 ($column) accepts an instance of \Illuminate\Contracts\Database\Query\Expression.
Just to confirm - as per vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php, the method phpdoc is defined as such:
    /**
     * Add a basic where clause to the query.
     *
     * @param  \Closure|string|array|\Illuminate\Contracts\Database\Query\Expression  $column
     * @param  mixed  $operator
     * @param  mixed  $value
     * @param  string  $boolean
     * @return $this
     */
    public function where($column, $operator = null, $value = null, $boolean = 'and')
    {
        if ($column instanceof Closure && is_null($operator)) {
            $column($query = $this->model->newQueryWithoutRelationships());

            $this->query->addNestedWhereQuery($query->getQuery(), $boolean);
        } else {
            $this->query->where(...func_get_args());
        }

        return $this;
    }

Hello!
Our stub overrides that
https://github.com/nunomaduro/larastan/blob/0750017b3d3e1bbe3d0342f3777f09d0c19f91a9/stubs/EloquentBuilder.stub#L221
The difference between the two is Contracts

Could be duplicate of #1547

The difference between the two is Contracts

Didn't notice the lack of Contracts 😬.

Could be duplicate of https://github.com/nunomaduro/larastan/issues/1547

That's the exact same issue but more high-level. I'll close mine and watch theirs.


[tlgen] Fix US node lookup for socket M1

Use first list element of host DS as index to lookup US node index

@eunchan  Not sure if it has impact on top_earlgrey Xbars, in case it does just revert it
Actually I was just toying around with the Ibex core and reused some IP blocks form opentitan and the xbar generation script.
When I created a very simple  system that only contains an Ibex core, a ram and a UART (xbar.hjson) I get following error:
argali/hw$ ../../opentitan/util/tlgen.py -t top_argali_basic/data/xbar.hjson -o top_argali_basic
WARNING: main contains generated key reset_connections
Traceback (most recent call last):
  File "../../opentitan/util/tlgen.py", line 94, in <module>
    main()
  File "../../opentitan/util/tlgen.py", line 74, in main
    if not tlgen.elaborate(xbar):
  File "../../opentitan/util/tlgen/elaborate.py", line 26, in elaborate
    process_pipeline(xbar)
  File "../../opentitan/util/tlgen/elaborate.py", line 168, in process_pipeline
    idx = dnode.us.index(host.ds)
ValueError: [U(core_instr) D(sm1_5)] is not in list

Now it gets more interesting when the rv_dm IP (xbar.hjson) is added as third host to the xbar in that case the problem disappears and the fix is not needed anymore.

Sorry for late response. Your observation is correct, then only way host port hits SOCKET_M1 is when it has only one connection. Thanks for finding the bug :)


[chore] pin to helm chart version 0.32.0

Changes
Updated helm install instructions to specifically install version 0.32.0.  This will help prevent breaking changes from affecting our fork until we've had a chance to test them.

@reese-lee This is so that when users install the opentelemetry-demo helm chart, they are installing a specific version that is known to work with our fork (and values file customizations).  The upstream repo and chart could be ahead of our fork and we could then update our install docs to the new(er) versions when we have time to test and validate that nothing breaks.


Add JS shortcode support for index page

This brings the JS index page up to par with the others, also addressing https://github.com/open-telemetry/opentelemetry.io/issues/1777 in the process
Preview: https://deploy-preview-1884--opentelemetry.netlify.app/docs/instrumentation/js/

@svrnm @chalin done! Please take another look.


refactor: native wasm integration

References https://github.com/penumbra-zone/web/issues/218

@grod220 this represents preliminary work on porting the penumbra-extension to the web. Based on our discussion during the web sync, having local dependencies means we won't need to continue publishing NPM packages since local development would point to locally compiled dependencies.
Regarding turborepo tooling considerations, I'm currently integrating the rust code into the build system and implementing sanity checking with sha256 hashing to verify we're using to the latest version.

Instead of putting the crate inside src/ next to the typescript code, think we can have two main folders alongside each other: packages/wasm/web/ and packages/wasm/crate.
We should drag over some of those helpers in penumbra/crates/wasm/publish/run.ts to help us compile as well. Given taht compiling takes so long, we shouldn't need to do it on every pnpm build. We should have a hash of the files in packages/wasm/crate saved somewhere and if there is a diff, we should throw an error, requiring the dev to re-compile and generate a new hash.

#492

CI is broken. lint now depends on presence of wasm output (d.ts files) and i've configured that in turbo.json but something in CI is failing.

also, since lint depends on wasm output, it would be cool if we could either

compile wasm once and forward that to other steps
have just one step that compiles wasm, then lints, then tests, then builds

Currently, necessary rust toolchain configs are missing from our yml files which seem to be the source of the failing CI workflows.

@turbocrime why are we nuking our existing CI? I was close to getting the CI to pass, and .github/workflows/wasm.yml was checking that the wasm crate builds cleanly and executed a full headless browser unit test which was removed.

Making a note here. While pairing with L, we decided to move the CI workflows into a single yml file with multiple jobs since turbo-build, turbo-lint, and turbo-test depend on the cache contents from executing turbo-compile. This simplifies our workflow succinctly.

:D


Core/Organization refactoring

Feature or Bugfix

Refactoring

Detail
Adding service layer to Organizations in order to follow the resolver-service-repository structure we established for v2.0 modularization.
Also cleanup some dead code.
Relates
#741
Security
Please answer the questions below briefly where applicable, or write N/A. Based on
OWASP 10.

Does this PR introduce or modify any input fields or queries - this includes
fetching data from storage outside the application (e.g. a database, an S3 bucket)?

Is the input sanitized?
What precautions are you taking before deserializing the data you consume?
Is injection prevented by parametrizing queries?
Have you ensured no eval or similar functions are used?

Does this PR introduce any functionality or component that requires authorization?

How have you ensured it respects the existing AuthN/AuthZ mechanisms?
Are you logging failed auth attempts?

Are you using or adding any cryptographic features?

Do you use a standard proven implementations?
Are the used keys controlled by the customer? Where are they stored?

Are you introducing any new policies/roles/users?

Have you used the least-privilege principle? How?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Testing:

[x] unit tests

Local deployment

[x] Create organization
[x] Modify organization
[x] Get organization
[x] List organizations
[x] Invite group to organization
[x] List organization groups
[x] Remove group from organization
[ ] Link environment to organization
[ ] List organization environments
[x] Archive organization

AWS deployment

[ ] Create organization
[ ] Modify organization
[ ] Get organization
[ ] List organizations
[ ] Invite group to organization
[ ] List organization groups
[ ] Remove group from organization
[ ] Link environment to organization
[ ] List organization environments
[ ] Archive organization


support import.meta.env

What kind of change does this PR introduce?
feature
closes #15833

Did you add tests for your changes?
yes

Does this PR introduce a breaking change?
no

What needs to be documented once your changes are merged?
EnvironmentPlugin supports import.meta.env

@vankop Hello, can you answer why did you close it?

I dont remember.. I guess we decided to not support this

maybe it make sense, up to you.


mir: 2.15.0 -> 2.16.0

Description of changes
Checked:

mir
miriway
miriway.passthru.tests

Wayland session has been removed by upstream: "This is not a useful, nor good example"
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Priorities
Add a :+1: reaction to pull requests you find important.

Upcoming lomiri.qtmir is not yet compatible with this, let's hold this back for awhile.

Short update on this: Looks like we should get fixed QtMir compatibility with Mir 2.17.

Looks like the qtmir issue isn't getting fixed just yet. I'll change this to include an init of a held-back mir_2_15 for qtmir, just so we're not eternally held back by this.

@ofborg build nixosTests.miriway nixosTests.lomiri

Miriway now needs a newer Mir just like miracle-wm, so further Miriway bumps need to wait for this PR: https://github.com/Miriway/Miriway/commit/28d153826fd66a952e6286545965e2f52aee9439
Miriway test runs fine, and Lomiri is fine with the held-back variant. So let's go ahead with this.


Inline assignments

Input:
const x = {};
x.x = x;
export default x;

A very small reduction in code size is possible by inlining exports.
CJS output
Current output in CJS format:
const x = {};
x.x = x;
module.exports = x;

This could be shortened to:
const x = module.exports = {};
x.x = x;

This saves 2 characters.
ESM Output
Current output in ESM format:
const x = {};
x.x = x;
export default x;

This could be shortened to:
const x = {};
export default x.x = x;

Again, this saves 2 characters.
JS Output
Current output in JS format:
( () => {
  const x = {};
  x.x = x;
  return x;
} )()

This could be shortened to:
( () => {
  const x = {};
  return x.x = x;
} )()

Again, this saves 2 characters. However, if JS format is optimized (#119), it'd also save a further 2 by removing need for brackets around a sequence expression:
( x => x.x = x )( {} )

instead of:
( x => (x.x = x, x) )( {} )

Actually there's a broader opportunity for inlining. Any assignment which evaluates to a value can be inlined into the next use of that value.
Input:
const x = {};
x.x = x;
export default {y: x};

Current output is identical to input. But it could be reduced to:
const x = {};
export default {y: x.x = x};

"assignments" which use Object.defineProperty(), Object.defineProperties() or Object.setPrototypeOf() can also be inlined. e.g.:
// Input
const x = {};
Object.defineProperty(x, 'x', {value: x});
export default {y: x};

Output with inlining:
const x = {};
export default {y: Object.defineProperty(x, 'x', {value: x})};

This saves 2 characters each time, or more if the variable names are longer than a single character.

Question: Would running the current output through Terser perform this optimization? If so, it may not be worth implementing in Livepack - there are already other optimizations Terser performs which Livepack doesn't (function inlining), so users who want fully-optimized code should be using Terser anyway. Livepack's mangle option is just a starting point.


error in 2016 dataset

I added a dataset for the 2016 mls season but when I try to build the database, I get the following error:
*** error: undefined method `to_date' for nil:NilClass
Did you mean?  to_a
I'm pretty sure that there's something wrong with my formatting but I'm not sure what as the formatting is pretty different between the 2014 and 2015 seasons and I can't find much documentation. Can anyone point me in the right direction?
Once I can get the proper formatting down, I think I have a script and datasource which will allow me (or anyone) to add a lot of fixture data quite easily.

Okay, I did some research, found this thread which features some of the contributers, and now know that the "week" designation is necessary. I also found out how to test local data with sportdb, so I can try and figure this out without committing to the repo. Now I have my data in the following format:
Week 1

Mar 06 New York Red Bulls 0-2 Toronto FC
Mar 06 Orlando City 2-2 Real Salt Lake
Mar 06 Chicago Fire 3-4 New York City
Mar 06 San Jose Earthquakes 1-0 Colorado Rapids
Mar 06 Houston Dynamo 3-3 New England Revolution
Mar 06 FC Dallas 2-0 Philadelphia Union
Mar 06 Portland Timbers	2-1 Columbus Crew
Mar 06 Vancouver Whitecaps 2-3 Montreal Impact
Mar 06 Seattle Sounders	 0-1 Sporting Kansas City
Mar 06 Los Angeles Galaxy 4-1 DC United

but when I try to sportdb --include my local data I now get the following error:
*** error: SQLite3::ConstraintException: NOT NULL constraint failed: games.play_at: INSERT INTO "games" ("score1", "score2", "round_id", "team1_id", "team2_id", "pos", "winner90", "winner", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

I think I've got it now. The following data could be included into an existing sportdb database:
Week 1

Mar/06 New York Red Bulls 0-2 Toronto FC
Mar/06 Orlando City 2-2 Real Salt Lake
Mar/06 Chicago Fire 3-4 New York City
Mar/06 San Jose Earthquakes 1-0 Colorado Rapids
Mar/06 Houston Dynamo 3-3 New England Revolution
Mar/06 FC Dallas 2-0 Philadelphia Union
Mar/06 Portland Timbers	2-1 Columbus Crew
Mar/06 Vancouver Whitecaps 2-3 Montreal Impact
Mar/06 Seattle Sounders	 0-1 Sporting Kansas City
Mar/06 Los Angeles Galaxy 4-1 DC United

I'll update all of 2016 in this format and if it works locally I'll push it to this repo.

Reformatted the 2016 to the above format and everything works great now.

@slaponicus Thanks for retrying. Sorry I was offline (a week) and, thus, not responding. Thanks for the update. Great that it works now. Keep it up. Cheers.


[BUG] Dashboard reports a 400 status to an API petition

Describe the bug
The following error has been reported for the first time in a AL2 machine testing the installation with 4.8.1-RC2
[root@ip-172-31-38-18 ec2-user]# cat /usr/share/wazuh-dashboard/data/wazuh/logs/wazuhapp.log | grep -i -E "error|warn"
{"date":"2024-07-09T11:01:12.185Z","level":"error","location":"monitoring:getApiInfo","message":"Request failed with status code 400"}
[root@ip-172-31-38-18 ec2-user]#

It seems that the petition that is generating the 400 status is the following:
[root@ip-172-31-38-18 ec2-user]# cat /var/ossec/logs/api.log | grep 400
2024/07/09 11:01:12 INFO: wazuh-wui <IP_ADDRESS> "POST /security/user/authenticate" with parameters {} and body {} done in 0.526s: 400

Steps to reproduce
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Request a AL2 machine (maybe a local VM also works)
Install the Wazuh stack with the assistant, by downloading it with the curl -sO https://packages-dev.wazuh.com/4.8/wazuh-install.sh and install it with the bash wazuh-install.sh -a -i -v command.
Check the logs with the cat /usr/share/wazuh-dashboard/data/wazuh/logs/wazuhapp.log | grep -i -E "error|warn" command.
See error

Expected behavior
This error should be not generated.
Host/Environment (please complete the following information):

OS: Amazon Linux 2

I deployed a Wazuh stack on an Ubuntu 22.04 and I got a failed request with 401 code status instead of 400 as described on the issue.
root@server:/home/vagrant# cat /usr/share/wazuh-dashboard/data/wazuh/logs/wazuhapp.log | grep -i -E "error|warn"
{"date":"2024-07-10T13:05:51.726Z","level":"error","location":"monitoring:getApiInfo","message":"Request failed with status code 401"}
root@server:/home/vagrant# grep 401 /var/ossec/logs/api.log
2024/07/10 13:05:51 INFO: wazuh-wui <IP_ADDRESS> "POST /security/user/authenticate" with parameters {} and body {} done in 1.680s: 401
2024/07/10 13:05:51 INFO: wazuh-wui <IP_ADDRESS> "POST /security/user/authenticate" with parameters {} and body {} done in 0.218s: 401

I tested this in an AL 2 machine and could not replicate it. The only error shown seems to be related to a race condition. We assume this is because Wazuh server API may have been initializing when the request was made.
From the Wazuh Dashboard perspective we didn't find any issue.
Wazuh Dashboard logs:
<EMAIL_ADDRESS>cat /usr/share/wazuh-dashboard/data/wazuh/logs/wazuhapp.log | grep -i monitoring
{"date":"2024-07-11T11:40:43.603Z","level":"error","location":"monitoring:getApiInfo","message":"socket hang up"}
{"date":"2024-07-11T11:47:06.656Z","level":"debug","location":"monitoring:initMonitoringConfiguration","message":"wazuh.monitoring.enabled: true"}
{"date":"2024-07-11T11:47:06.656Z","level":"debug","location":"monitoring:initMonitoringConfiguration","message":"wazuh.monitoring.frequency: 900 (0 */15 * * * *)"}
{"date":"2024-07-11T11:47:06.657Z","level":"debug","location":"monitoring:initMonitoringConfiguration","message":"wazuh.monitoring.pattern: wazuh-monitoring-* (index prefix: wazuh-monitoring-)"}
{"date":"2024-07-11T11:47:06.692Z","level":"debug","location":"monitoring:checkPluginPlatformStatus","message":"Waiting for Kibana and Elasticsearch servers to be ready..."}
{"date":"2024-07-11T11:47:06.736Z","level":"debug","location":"monitoring:checkTemplate","message":"Updating the monitoring template"}
{"date":"2024-07-11T11:47:06.975Z","level":"debug","location":"monitoring:checkTemplate","message":"Updated the monitoring template"}
{"date":"2024-07-11T11:47:07.031Z","level":"debug","location":"monitoring:getApiInfo","message":"Getting API info for default"}
{"date":"2024-07-11T11:47:08.003Z","level":"debug","location":"monitoring:fetchAllAgentsFromApiHost","message":"Getting all agents from ApiID: default"}
{"date":"2024-07-11T11:47:08.033Z","level":"debug","location":"monitoring:fetchAllAgentsFromApiHost","message":"ApiID: default, Agent count: 0"}

Wazuh API logs:

<EMAIL_ADDRESS>ec2-user]# cat /var/ossec/logs/api.log | grep -i error
2024/07/11 11:46:07 ERROR: Error in CTI service request: a72f3cc3-7f39-4993-9d9c-41ab4e97602a, v4.8.1
    raise WazuhInternalError(2100, extra_message=extra_message)
wazuh.core.exception.WazuhInternalError: Error 2100 - Error in CTI service request: a72f3cc3-7f39-4993-9d9c-41ab4e97602a, v4.8.1
wazuh.core.exception.WazuhInternalError: Error 2100 - Error in CTI service request: a72f3cc3-7f39-4993-9d9c-41ab4e97602a, v4.8.1

Ok then, we should close this issue as not planned, and use it as "known issue" if the error appears again. Thank you.


High CPU usage

I noticed that when I test renderscript in my phone (Samsung S4), cpu usage is very high.
It seems that the code is running on the CPU.
Is it reasonable?

CPU is also utilized by the CNNdroid, it's used for acceleration of Pooling and LRN layers and for some preprocessing stuff, so it's reasonable to have high cpu usage in those time slots.

I only use conv layer, the cpu usage is still very high.
Is it possible that the codes in renderscript also use CPU?

Yes it can, Renderscript can automatically decide to accelerate the code on the CPU if using GPU would not offer a noticeable performance gain or if the GPU itself is not supported (which should not be your case)
By the way, I should note that if you have ReLU layers, they are applied to the conv output over CPU, so you'll still observe some activity in cpu.

I have kill all the Relu layer and only test the performance of the conv-rs codes.
My code is very simple:
for(int i = 0; i < 99999; i++)
     conv.myScript44.forEach_root(outputAllocation.get(i));

The CPU usage is still very high (over 70%). That's weird.
@latifisalar Have you test the cpu usage and gpu usage before?

@jay2002 do you have an exynos or snapdragon S4?
Also see this issue: https://github.com/ENCP/CNNdroid/issues/5f

Hi @droidarehere
I have add '#pragma rs_fp_relaxed' for the RS code.
My test device is OPPO r7 with Snapdragon MSM8939, OPPO r9 with Malit-860 MP2, and Samsung S4 with Exynos 5410.
In my test, after add '#pragma rs_fp_relaxed', the cpu usage of OPPO r7 dropped to 20%, but the speed of convolution also dropped. So I'm not sure whether it is run on GPU. But for OPPO r9 and Samsung S4, after add '#pragma rs_fp_relaxed', the cpu usage is still very high.
Any idea?

@jay2002 Sounds like you have discovered which device has a GPU-enabled implementation.
Some tips for timing:

Be sure you have an rs.finish() before ending the timing loop to ensure all kernel work is finished.
Run the kernel many times, throw away the first few runs and then take the average over remaining runs.
Try to take as much script init/allocation init out of the timing loop as possible.

@droidarehere Thanks for your advertise.
Have you test the cpu and gpu uasge before? What's the usual cpu usage when you test?

@jay2002 I just looked, around the same as yours. I wouldn't worry about the exact number though it will vary depending on how many cores the device has, how many background processes are running, how busy the scheduler on your specific device wants to clock the cores, etc.

I have chang the code in my project ,just reomve some four dimension array and using one dimension will make the app running faster.You can have a try.