Crashes from Apple Watch are not reported by Crashlytics

[REQUIRED] Step 1: Describe your environment

Xcode version: 12.2 b3
Firebase SDK version: 6.34
Installation method: CocoaPods
Firebase Component: Crashlytics

[REQUIRED] Step 2: Describe the problem
Crashlytics.crashlytics().didCrashDuringPreviousExecution() returns false on Apple Watch after crash. Crashes are not visible in Firebase dashboard.
Steps to reproduce:
Check sample project here: https://github.com/michaello/Crashlytics-Test
Tested both on simulator(6.2) and real Apple Watch(watchOS 7.1)

I have the same problem, tried running with/without debugger, simulator, device etc. Are anyone able to get crash reports off the Apple Watch?

I've received crash reports on apple watch simulator and device just fine. It could be that your crashes are mach exceptions or signal crashes which are not able to be recorded. I would create a test crash button and tie it to a selector that doesn't exist.
I have noticed it does take a bit for the crash to be processed and displayed but I believe that is caused by the backend and nothing we can do on the frontend.
In regards to the sample project above I didn't see where you are forcing a crash to test, or where your firebase initialization is.

@jostster I'm using the following logic to trigger a crash on the device:
let something = 30 / divisionByZero

Where divisionByZero is a defined variable set to 0. If you use 0 instead or trying to access a selector that doesn't exist directly, the compiler will stop you during build-time.

@jostster sorry, forgot to push the code. Updated the repo, setup is in ExtensionDelegate.

@grEvenX you would want to use a string selector so that it passes the build checks like perform(Selector(("crash")))

Also can you confirm you are not attaching the debugger during the crash?

 From there I then continue on the simulator without the debugger attached. However can you run it in the simulator with debugger attached and look for [Firebase/Crashlytics][I-CLS000000] Root: <directory> in the xcode console. From there open a Finder window to that path. Stop the debugger so it isn't attached and run the application on just the simulator. Trigger a crash and browse to the path above, followed by v5/reports/active. You should see some report ID's in there.

As mentioned:
Tested both on simulator(6.2) and real Apple Watch(watchOS 7.1)
Without the debugger.

@jostster Debugger detached: yes. My approach is to detach the debugger, then launch the Apple Watch app again through the debugger to check if it has a crash reported. Tried changing to using a selector instead of the "division by zero" logic, but that didn't help (as I would expect, they should both trigger the same kind of crash).
I can inspect the directory you mentioned, and there is a folder in v5/reports/active that seems to reset for each launch.
The folder is named like c7cdf51f3b8344bcac1874824169481d (name changes for each launch, and the existing files have been deleted) and has the following files:

binary_images.clsrecord
internal_incremental_kv.clsrecord
metadata.clsrecord
sdk.log

I enabled debugging with -FIRDebugEnabled option, and this is my output from an app launch just after it crashed:
Warning: Error creating LLDB target at path '/Users/even/Library/Developer/Xcode/DerivedData/MyBioAge-gmlbyptstghpoeduwyrefofbptas/Build/Products/Debug-watchsimulator/Myworkout GO.app'- using an empty LLDB target which can cause slow memory reads from remote devices.
skipping /Applications/Xcode-beta.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
2020-11-12 13:43:29.379813+0100 Myworkout GO Extension[79141:1893179] [default] lookupMainFuncAddressInMachHeader:71: Invalid Swift entry point data
2020-11-12 13:43:29.379947+0100 Myworkout GO Extension[79141:1893179] [default] lookupMainFuncAddressInMachHeader:77: Swift entry point addres could not be determined.
2020-11-12 13:43:29.445079+0100 Myworkout GO Extension[79141:1893343] 7.0.0 - [Firebase/Core][I-COR000001] Configuring the default app.
Nov 12 13:43:29  Myworkout GO Extension[79141] <Debug>: 7.0.0 - [Firebase/Core][I-COR000001] Configuring the default app.
2020-11-12 13:43:29.445378+0100 Myworkout GO Extension[79141:1893343] 7.0.0 - [Firebase/Core][I-COR000033] Data Collection flag is not set.

 I do see there is an ongoing issue on Apple Forums with it, but this could be the cause? https://developer.apple.com/forums/thread/661727.
I just tested again with our implementation which uses SPM to install and received a crash report in the firebase console.

@jostster I'm using Crashlytics from CocoaPods, I can try to see if it works any better by using SPM. Which version are you currently at just to check that?
When it comes to the Invalid swift entry point, I get that error even when just creating a new Apple Watch project from scratch through Xcode, so I would be surprised if this causes any issue with Crashlytics.

@michaello it's great that you have provided a sample code. It would be more helpful if you provided some guidelines on how to test the crash using it and push a commit that would actually be possible to build. It seems that it's using CocoaPods, but there's no Podfile etc. included so the project doesn't build (at least if you check out a clean copy).

Any progress on this @grEvenX  @michaello ?

@grEvenX sorry, added Podfile to my project. Just run the watch app and tap the button.

Ok, I downloaded your project and played around with it. I had trouble getting things to install but that doesn't seem to be the issue. It looks like the issue is crashes happening in SwiftUI are not being recognized. I replaced your SwiftUI with an interface controller and forced a crash that way, and the cls report was generated.

UPDATE: After debugging this it looks like SwiftUI crashes are mach-exception crashes so they will not be detected on watchOS :-(

@jostster Sorry for asking, but would you be able to provide a code change that leads to a crash in the example project just so we can test and verify that it indeed works for non mach-exception crashes?

Crashlytics-Test-main.zip
Here is the updates I did. Basically I just used a Storyboard instead of SwiftUI. I didn't test using swiftUI that referenced swift code to see if those crashes were tracked, but I probably should since we are starting to implement more SwiftUI in my current project.

I'm facing the same problems while trying to integrated Crashlytics with SPM on a watch project. No reports seems too be sent to the firebase console.

@lukacs-m How are you generating a crash? Is it within SwiftUI?

@jostster Hello, I am also facing issues with the SPM implementation to get the watch crashes in the dashboard.

Firebase Version: 7.5.1
Xcode: 12.4
Installation method: SPM
-Apple Watch series 5, watch os 7.3

I am not using any SwiftUI component in the app.

A new app has been created in firebase for the watch. The GoogleService-Info.plist has the WatchKit extension bundle identifier: com.company.app.staging.watchkitapp.watchkitextension.
FirebaseApp.configure() is called in the applicationDidFinishLaunching of the watch app extension.
This script is called in the Wachtkit extension build scripts ${BUILD_DIR%Build/*}SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run

I am also testing this in the applicationDidFinishLaunching, but it always comes back as false:
Crashlytics.crashlytics().didCrashDuringPreviousExecution()
The same implementation is working on the iPhone app and didCrashDuringPreviousExecution returns true in iOS when building after a crash (the debugger is not attached during the crash)
I am generating a crash with fatalError()
I looked at your project and everything seems similar - except that you are using cocoa pods.
Also @lukacs-m, did you find a solution?
Thanks for your help!

@JonMo Are you attached to the debugger?

No, I am not when I trigger the crashes

Are you running this in simulator or device? Could you reference https://github.com/firebase/firebase-ios-sdk/issues/6843#issuecomment-725660258 and let me know the details?

I was testing on device but here are the results I am getting through the simulator when I follow your instructions.
The debugger is not attached when I trigger the crash.
I am seeing reports in the v5/reports/active folder. Each crash creates a new folder with 3 files in it:

metadata.clsrecord
binary_images.clsrecord
internal_incremental_kv.clsrecord

Here are the logs in the console on the next launch:
2021-02-03 23:47:59.295583-0500 TestAppWatch Extension[89935:1954982] [Firebase/Crashlytics] Version 7.5.0 2021-02-03 23:47:59.316288-0500 TestAppWatch Extension[89935:1955189] 7.5.0 - [Firebase/Core][I-COR000001] Configuring the default app. Feb  3 23:47:59  TestAppWatch Extension[89935] <Debug>: 7.5.0 - [Firebase/Core][I-COR000001] Configuring the default app. 2021-02-03 23:47:59.316834-0500 TestAppWatch Extension[89935:1955189] 7.5.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics] Running on watchOS Simulator, 7.2.0 (20D64) Feb  3 23:47:59  TestAppWatch Extension[89935] <Debug>: 7.5.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics] Running on watchOS Simulator, 7.2.0 (20D64) 2021-02-03 23:47:59.317089-0500 TestAppWatch Extension[89935:1955189] 7.5.0 - [Firebase/Core][I-COR000033] Data Collection flag is not set. Feb  3 23:47:59  TestAppWatch Extension[89935] <Debug>: 7.5.0 - [Firebase/Core][I-COR000033] Data Collection flag is not set. 2021-02-03 23:47:59.317347-0500 TestAppWatch Extension[89935:1955189] 7.5.0 - [Firebase/Crashlytics][I-CLS000000] Root: /Users/jonathan/Library/Developer/CoreSimulator/Devices/99755E7F-5A8F-4CA0-ACD6-E76CAB779181/data/Containers/Data/Application/08F678CA-485E-4D13-B551-35A2E434E22E/Library/Caches/com.crashlytics.data/com.refineTestApp.theTestApp.staging.watchkitapp.watchkitextension Feb  3 23:47:59  TestAppWatch Extension[89935] <Debug>: 7.5.0 - [Firebase/Crashlytics][I-CLS000000] Root: /Users/jonathan/Library/Developer/CoreSimulator/Devices/99755E7F-5A8F-4CA0-ACD6-E76CAB779181/data/Containers/Data/Application/08F678CA-485E-4D13-B551-35A2E434E22E/Library/Caches/com.crashlytics.data/com.refineTestApp.theTestApp.staging.watchkitapp.watchkitextension 2021-02-03 23:47:59.317658-0500 TestAppWatch Extension[89935:1955189] 7.5.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports:Event] Firebase Analytics SDK not detected. Crash-free statistics and breadcrumbs will not be reported Feb  3 23:47:59  TestAppWatch Extension[89935] <Debug>: 7.5.0 - [Firebase/Crashlytics][I-CLS000000] [Crashlytics:Crash:Reports:Event] Firebase Analytics SDK not detected. Crash-free statistics and breadcrumbs will not be reported 2021-02-03 23:47:59.317984-0500 TestAppWatch Extension[89935:1955189] 7.5.0 - [Firebase/Crashlytics][I-CLS000000] Automatic data collection is enabled. Feb  3 23:47:59  TestAppWatch Extension[89935] <Debug>: 7.5.0 - [Firebase/Crashlytics][I-CLS000000] Automatic data collection is enabled. 2021-02-03 23:47:59.318267-0500 TestAppWatch Extension[89935:1955189] 7.5.0 - [Firebase/Crashlytics][I-CLS000000] Unsent reports will be uploaded at startup Feb  3 23:47:59  TestAppWatch Extension[89935] <Debug>: 7.5.0 - [Firebase/Crashlytics][I-CLS000000] Unsent reports will be uploaded at startup 2021-02-03 23:47:59.318515-0500 TestAppWatch Extension[89935:1955189] 7.5.0 - [Firebase/Installations][I-FIS002000] -[FIRInstallationsIDController createGetInstallationItemPromise], appName: __FIRAPP_DEFAULT Feb  3 23:47:59  TestAppWatch Extension[89935] <Debug>: 7.5.0 - [Firebase/Installations][I-FIS002000] -[FIRInstallationsIDController createGetInstallationItemPromise], appName: __FIRAPP_DEFAULT DidCrash before: false Crashlytics Unsent report: false

Hey @jostster, Does it give you more info about this issue?
Thanks for your help

@carloshwa Crashlytics cannot detect SwiftUI crashes on watchOS because they are mach-o exceptions which, watchOS does not have access to.

@grEvenX were you ever able to get the divided by 0 error to be reported to Crashlytics? I implemented it by using a for loop that divides by the iterated value ( this passes the build check ), and I get nothing. The only error I can get reported is the one @jostster suggested. A simple `FatalError("crash") also doesn't seem to do the trick. Am I missing something when it comes to the types of errors being reported?

Due to the limitations of the watchos API we are unable to catch mach and signal crashes.

@carloshwa I am not using SwiftUI in this project, so I don't think it is related for me.
@jostster I'll try to create a sample project soon to send you. Thanks

Any progress on this? I've followed all of the instructions here for my project and see the same thing as this: https://github.com/firebase/firebase-ios-sdk/issues/6843#issuecomment-773028176
Still can't get any crashes to show up in the console, either from simulator or device. I'm triggering the crash with an invalid selector.
I've read over all of the comments here and believe that I've tried everything suggested. Happy to provide more details if I can.
NOTE: My project DOES use SwiftUI. I trigger the crash from a SwiftUI button, which then calls a block with DispatchQueue.main.async, inside of which there is the call to the invalid selector. When I symbolicate the crash through Xcode, it does appear that this is neither a SIGNAL nor a mach exception, with the call to async getting out of SwiftUI-land:
Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Application Specific Information:
abort() called

Last Exception Backtrace:
0   CoreFoundation                  0x204b07d0 __exceptionPreprocess + 216
1   libobjc.A.dylib                 0x2b543c04 objc_exception_throw + 55
2   CoreFoundation                  0x203c2244 -[NSObject+ 168516 (NSObject) doesNotRecognizeSelector:] + 139
3   CoreFoundation                  0x204b2ac8 ___forwarding___ + 1127
4   CoreFoundation                  0x204b4abc _CF_forwarding_prep_0 + 91
5   MYAPP                           0x04b85794 closure #1 in ExtensionDelegate.myFunction() + 366484 (ExtensionDelegate.swift:XXX)
6   MYAPP                           0x04b54f4c thunk for @escaping @callee_guaranteed () -> () + 167756 (<compiler-generated>:0)
7   libdispatch.dylib               0x2a8ae9a4 _dispatch_call_block_and_release + 23
8   libdispatch.dylib               0x2a8b01bc _dispatch_client_callout + 15
9   libdispatch.dylib               0x2a8bcfbc _dispatch_main_queue_callback_4CF + 911
10  CoreFoundation                  0x20430eec __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 11
11  CoreFoundation                  0x2042b428 __CFRunLoopRun + 2451
12  CoreFoundation                  0x2042a574 CFRunLoopRunSpecific + 571
13  GraphicsServices                0x34bb04c0 GSEventRunModal + 159
14  UIKitCore                       0x252b5adc -[UIApplication _run] + 1103
15  UIKitCore                       0x252bafdc UIApplicationMain + 139
16  WatchKit                        0x272869e4 WKExtensionMain + 759
17  libdyld.dylib                   0x35c3191c start + 3

Hello Paul,
Notice the exception is a sigabrt which is a signal abort, which is a
signal exception. Unfortunately due to watchOS limitations we are unable to
capture any crashes generated from SwiftUI.
On Sun, Mar 28, 2021 at 10:31 AM paulcarpenter @.***>
wrote:

Any progress on this? I've followed all of the instructions here for my
project and see the same thing as this: #6843 (comment)
https://github.com/firebase/firebase-ios-sdk/issues/6843#issuecomment-773028176
Still can't get any crashes to show up in the console, either from
simulator or device. I'm triggering the crash with an invalid selector.
I've read over all of the comments here and believe that I've tried
everything suggested. Happy to provide more details if I can.
NOTE: My project DOES use SwiftUI. I trigger the crash from a SwiftUI
button, which then calls a block with DispatchQueue.main.async, inside of
which there is the call to the invalid selector. When I symbolicate the
crash through Xcode, it does appear that this is neither a SIGNAL nor a
mach exception, with the call to async getting out of SwiftUI-land:
Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0
Application Specific Information:
abort() called
Last Exception Backtrace:
0   CoreFoundation                  0x204b07d0 __exceptionPreprocess + 216
1   libobjc.A.dylib                 0x2b543c04 objc_exception_throw + 55
2   CoreFoundation                  0x203c2244 -[NSObject+ 168516 (NSObject) doesNotRecognizeSelector:] + 139
3   CoreFoundation                  0x204b2ac8 forwarding + 1127
4   CoreFoundation                  0x204b4abc _CF_forwarding_prep_0 + 91
5   MYAPP                           0x04b85794 closure #1 in ExtensionDelegate.myFunction() + 366484 (ExtensionDelegate.swift:XXX)
6   MYAPP                           0x04b54f4c thunk for @escaping @callee_guaranteed () -> () + 167756 (:0)
7   libdispatch.dylib               0x2a8ae9a4 _dispatch_call_block_and_release + 23
8   libdispatch.dylib               0x2a8b01bc _dispatch_client_callout + 15
9   libdispatch.dylib               0x2a8bcfbc _dispatch_main_queue_callback_4CF + 911
10  CoreFoundation                  0x20430eec CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 11
11  CoreFoundation                  0x2042b428 __CFRunLoopRun + 2451
12  CoreFoundation                  0x2042a574 CFRunLoopRunSpecific + 571
13  GraphicsServices                0x34bb04c0 GSEventRunModal + 159
14  UIKitCore                       0x252b5adc -[UIApplication _run] + 1103
15  UIKitCore                       0x252bafdc UIApplicationMain + 139
16  WatchKit                        0x272869e4 WKExtensionMain + 759
17  libdyld.dylib                   0x35c3191c start + 3
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-ios-sdk/issues/6843#issuecomment-808912706,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACD73UEE6P66YN3TNXAU6LTF5DWPANCNFSM4TATMEQA
.

@jostster Wow, no need to answer my annoying questions on a Sunday. I actually deleted my comment that you replied to because I got confused myself. Two things:
– I know that SIGABRT is a signal abort, but it was triggered by calling a missing selector, which is what you had recommended above. I was confused why the preferred method of testing this was in fact supposedly not detectable on WatchOS.
– After waiting for several hours, a crash log did actually appear on the Firebase console. So something did work here! I just need to figure out which of my many tests it was actually associated with, and see if any more crashes appear.
But to confirm for now: I was able to get a crash log to show up in Firebase from an app using SwiftUI, so long as the crash did not occur from within SwiftUI itself. Not sure there's anything more to look into here, but I'll post more details if I find any that seem relevant.

So I THINK but am not certain that because the invalid selector is
initially triggered from swiftUI it generates as a signal.
Also I have noticed that sometimes it can take up to an hour for reports to
show up in console.
 I actually deleted my comment that you
replied to because I got confused myself. Two things:
– I know that SIGABRT is a signal abort, but it was triggered by calling a
missing selector, which is what you had recommended above. I was confused
why the preferred method of testing this was in fact supposedly not
detectable on WatchOS.
– After waiting for several hours, a crash log did actually appear on the
Firebase console. So something did work here! I just need to figure out
which of my many tests it was actually associated with, and see if any more
crashes appear.
But to confirm for now: I was able to get a crash log to show up in
Firebase from an app using SwiftUI, so long as the crash did not occur from
within SwiftUI itself. Not sure there's anything more to look into here,
but I'll post more details if I find any that seem relevant.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/firebase/firebase-ios-sdk/issues/6843#issuecomment-808920296,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACD73UD23B7IVWVDL4DZATTF5KHPANCNFSM4TATMEQA
.

Hi Team,
Any update in watch os crashlytics.I am not able to get crash from the watch. Can anyone share a working example with dsym symbol upload that would very help full for us.
Thanks.

Hey all! Has anyone seen the issue with crashes not being reported with App Store version specifically?
We did some digging and found out that for some weird all the symbols are stripped from the extension binary if the app is exported for the App Store distribution. That prevents Crashlytics from working because it needs to get an address of __mh_execute_header symbol. Weirdly enough, this happens regardless of build settings used and happens only with App Store (Enterprise, for instance, is ok).
Curious if you have encountered this @jostster

Hi @markvasiv, we are experiencing issues with crashes not been reported to Crashlytics. We've had multiple reports from users that our Apple Watch app has crashed while a workout is being recorded (our watch app allows users to record a running workout). However, when we open Crashlytics we cannot see any crash reports. We also checked App Store Connect and no crash files could be found either. It has become very frustrating to debug these issues.
Do you know of any workaround to get the crash reports?

Hey folks, we're going through some old bugs. I wanted to close this out and give just the high level blocker.
Crashlytics captures crashes in 3 ways: C++ Exceptions, ObjC Mach Exceptions, and Signals. Unfortunately, the operating system APIs to capture Mach Exceptions and Signals does not exist on watchOS. This is a limitation for all crash reporters.
Right now the best path toward getting this fully supported is by giving Feedback to Apple


[Feature] editing popular categories section

Description
The books added as a sample for the categories have no relevance to the category type. I will edit it with better books. I want to add more books and add more descriptions to the books.
Screenshots
No response
Checklist

[X] I have checked the existing issues
[X] I have read the [Contributing Guidelines]
[X] I am willing to work on this issue (optional)
[X] I am a GSSoC'23 contributor

@aastha170902 go ahead but before proceeding make sure to gp through the description once #330

@aastha170902 any update?

can i do this task under gssoc'23

hey @aastha170902 are you really interested or will assign this to someone else, please do respond to the message!!

hey @vk20july are you willing to take this issue? if yes then do respond

hey @vk20july are you willing to take this issue? if yes then do respond

Yes

hey @aastha170902 are you really interested or will assign this to someone else, please do respond to the message!!

Yes I am sorry was a bit busy with my placements. I will do this.

@aastha170902 any update ?

@rohansx I would like to work on this issue.
Already made the issue... #655
Please confirm!


Establish the scope of DMDS Readiness

Agree what needs to done to decide if the team are ready to migrate, e.g.

Access to Mauro
Folder access (individual folders)
Access to the Orchestrator (can everyone access it at once)
Access to the DD Pipeline etc.

This is now completed (documented) under ticket #293


wip/6.0 Replace 'AtomicInteger' with 'MutableInteger' in single thread scenario

There seems to be an established pattern to use AtomicInteger as a convenient class of mutable integer container, regardless of whether it is used in single thread scenario (e.g. within method as a temporary variable without being exposed externally) or not. That is a misuse or sloppiness for we have to pay the performance cost of concurrency safety unnecessarily.
Luckily, in some recent PR by Andrea, a more appropriate substitute has been committed: MutableInteger.
Below is the jmh benchmark result between AtomicInteger and MutableInteger when it comes to increasing by 1:
Benchmark                Mode  Cnt   Score     Error    Units
benchmarkAtomicInteger   avgt   5       13.143 ± 6.360  ns/op
benchmarkMutableInteger  avgt   5       0.399 ± 0.045   ns/op

It is a simple fact that MutableInteger is much much quicker!
This is the simple jmh benchmark methods:
    @Benchmark
    @BenchmarkMode(Mode.AverageTime)
    @OutputTimeUnit(TimeUnit.NANOSECONDS)
    public void benchmarkAtomicInteger() {
        AtomicInteger counter = new AtomicInteger();
        int val = counter.incrementAndGet();
    }

    @Benchmark
    @BenchmarkMode(Mode.AverageTime)
    @OutputTimeUnit(TimeUnit.NANOSECONDS)
    public void benchmarkMutableInteger() {
        MutableInteger counter = new MutableInteger();
        int val = counter.getAndIncrement();
    }

Another common performance optimization is we can use new AtomicInteger() in lieu of new AtomicInteger( 0 ). Jmh proves that the performance difference is significant:
Benchmark                                 Mode  Cnt   Score    Error  Units
benchmarkAtomicIntegerDefaultConstructor  avgt    5  15.199 ± 13.034  ns/op
benchmarkAtomicIntegerExplicitConstructor avgt    5  35.029 ± 88.696  ns/op

    @Benchmark
    @BenchmarkMode(Mode.AverageTime)
    @OutputTimeUnit(TimeUnit.NANOSECONDS)
    public void benchmarkAtomicIntegerDefaultConstructor() {
        AtomicInteger counter = new AtomicInteger();
        int val = counter.incrementAndGet();
    }

    @Benchmark
    @BenchmarkMode(Mode.AverageTime)
    @OutputTimeUnit(TimeUnit.NANOSECONDS)
    public void benchmarkAtomicIntegerExplicitConstructor() {
        AtomicInteger counter = new AtomicInteger( 0 );
        int val = counter.incrementAndGet();
    }

Thanks @NathanQingyangXu , applied upstream.

:+1: Looked great Nathan


Refactor config

Rename 'vara' to 'varats' and introduce new 'vara' sub-config.

 Here is an overview of what got changed by this pull request:

Issues
======
+ Solved 2
- Added 5

Clones added
============
- varats/projects/c_projects/git.py  1
- varats/projects/c_projects/gzip.py  1

See the complete overview on Codacy

 Here is an overview of what got changed by this pull request:

Issues
======
+ Solved 2
- Added 2

Clones added
============
- varats/projects/c_projects/gzip.py  1
- varats/projects/c_projects/git.py  1

See the complete overview on Codacy


Fix responsive on login, register, forgot password

Fix responsive for the big screen:

2880px
3072px
3840px
5120px

Fix issue on pull request Vwanu #100


updating TypesScript from 2.1 to 2.5

I decided to write this up, because it wasn't clear for me how to do it and maybe this will be helpful for other people.
If you are using npm 5.0 with package-lock.json or shrinkwrap you can update to later versions of typescript without having to use forks.
Principle described here, and here's example in case package-lock.json file:
    "brunch-typescript": {
      "version": "2.1.0",
      "resolved": "https://registry.npmjs.org/brunch-typescript/-/brunch-typescript-2.1.0.tgz",
      "integrity": "sha1-CbJJHp2mxm4o+6udxIxmFhsL6xg=",
      "dev": true,
      "requires": {
        "anymatch": "1.3.0",
        "typescript": "https://registry.npmjs.org/typescript/-/typescript-2.5.2.tgz"
      },
      "dependencies": {
        "typescript": {
          "version": "https://registry.npmjs.org/typescript/-/typescript-2.5.2.tgz",
          "integrity": "sha1-8PBF4Zb2mnLwayX9O9OdAcPOmYQ=",
          "dev": true
        }
      }
    },

just find "brunch-typescript" section in your file and change "2.1.6" to "https://registry.npmjs.org/typescript/-/typescript-2.5.2.tgz", then run npm install.

This should be solved with #43.

Hi @JLarky - can you confirm if the fix in #43 solves your problem?  If so, please close this issue.

I presume that it did :) I do not use brunch anymore


chore(deps): update common-dev-assets digest to 2a961d3

This PR contains the following updates:

Package
Update
Change

common-dev-assets
digest
eb1c66a -> 2a961d3

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline


add name-calling to the code of conduct

Pre-Submission Checklist

[ ] Your pull request targets the staging branch of FreeCodeCamp.
[x] Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
[x] You have only one commit (if not, squash them into one commit).
[x] All new and existing tests pass the command npm run test-challenges. Use git commit --amend to amend any fixes.

Type of Change

[x] Small bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds new functionality)
[ ] Breaking change (fix or feature that would change existing functionality)
[ ] Add new translation (feature adding new translations)

Checklist:

[x] Tested changes locally.
[ ] Closes currently open issue (replace XXXX with an issue no): Closes #XXXX

Description

@QuincyLarson What do you think of changing unwelcome sexual attention to unwanted attention, sexual or otherwise

@BerkeleyTrue yes - let's just make that "unwelcome attention" since we already mention sexual language earlier in the same sentence. I think this will be sufficiently unambiguous.

Thanks @QuincyLarson, tagging @BerkelyTrue to update server.


Annotation processor to set default Locale

will live in j2cl-java-util-locale-annotation-processor
will generate an class with a single field.

Closed by #88


Provide a way to base Timer on some Time object

What problem does this solve or what need does it fill?
The docs for Bevy 0.13 indicate Time<Virtual> provides a timer running at a multiple of the system clock.  Res<Time<Virtual>> can be sped up, slowed down, or paused to control game time, so long as the game's objects are tied to Res<Time<Virtual>> for their time.
The docs don't indicate a way to produce a Time<Virtual> based on Res<Time<Virtual>> or another Time<Virtual>.
Further, the docs for Timer don't indicate whether Timer follows Res<Time<Real>> or Res<Time<Virtual>>, and there is nothing in the docs indicating any way to control this.
For events with cooldown, it would make sense to be able to somehow time the cooldown relative to a virtual timer tied to game time.  For example, Final Fantasy's active time battle system uses a character's speed to slowly fill a time gauge before the character's turn begins; while several games have cooldown times for using special moves.  These times can be made faster or slower by status effects to increase or decrease a character's speed.  A good approach to do so is not obvious.
There are also speedup and slowdown mechanics such as dialog box speed or battle speed in RPGs separate from the rest of game time.  These somehow require timing against a clock relative to the main game clock.
What solution would you like?
A way to time events based on a given time source.  One approach is to allow creation of a Time<Virtual> based on some other Time object specified by the programmer, and adjust the Time<Virtual> speed to compound with its base clock.  For example, my_time can be set to 0.5 speed and based on Res<Time<Virtual>>; setting Res<Time<Virtual>> to 0.5 speed would have my_time run at 0.25 system speed.
A way to create a timer based on a Time object to go with this.  my_timer could then be a Timer based on my_time, and speeding up or slowing down my_time would affect the length of real-time required for my_timer to finish.
What alternative(s) have you considered?
Writing a custom timer by simply reading Res<Time<Virtual>> and looking at the current virtual time versus a recorded virtual time at which the timer started.  This offloads the entire function of Timer onto a custom implementation, which means every programmer needs to implement their own type of Timer.

Okay, from reading the docs, I thought timers just ran on their own.
I looked through the source code to see if it'd be easy enough to just implement this myself and PR it; it turns out timers have to be manually ticked.
…I don't see how timers are anything other than an overcomplicated float.  How are Timer and Stopwatch even useful at all in their current state?  You could just check the clock and update a variable instead; the only difference right now seems to be updating your own variable requires an assignment operator to add the duration of time elapsed, while updating a Timer requires calling tick() with the duration of time elapsed.

There are some invariants involved in keeping track of time, and you want to use a Duration, not a float.
But overall I agree with your analysis: it's frustrating and unintuitive that timers don't advance on their own. IMO the best way to resolve that would be to use trait queries (generalized to resources) and advance all objects that implement a derivable trait.


No Tailwind CSS output when using postcss-easy-import

What version of @tailwindcss/jit are you using?
v.0.1.3
What version of Node.js are you using?
v15.12.0
What browser are you using?
Chrome
What operating system are you using?
macOS
Reproduction repository
https://github.com/sboerrigter/tailwind-jit-easy-import
👋
When using postcss-easy-import (https://www.npmjs.com/package/postcss-easy-import) the compiler doesn't output any tailwind CSS and doesn't give any errors. You can reproduce this but by running npm run dev in the reproduction repository: https://github.com/sboerrigter/tailwind-jit-easy-import.
If you replace @tailwindcss/jit with tailwindcss in postcss.config.js the CSS output does get compiled correctly and the background of the page should turn green because of bg-green-500.

Hey! In your case just need to move your plugins around in postcss.config.js:
  module.exports = {
    plugins: {
+     'postcss-easy-import': {},
      '@tailwindcss/jit': {},
-     'postcss-easy-import': {},
      autoprefixer: {},
    },
  }

The regular tailwindcss library has some special logic for treating @import "tailwindcss/base" as @tailwind base, but haven't added that to the JIT which is why you see the difference. Going to add that now I think anyways 👍

Thanks. Changing plugins the order fixes it indeed!


Transactional Outbox configuration with EntityFramework Core interceptor (SaveChangesInterceptor)

Contact Details
No response
Version
8.x
On which operating system(s) are you experiencing the issue?
No response
Using which broker(s) did you encounter the issue?
No response
What are the steps required to reproduce the issue?
# Start and try send request
1. Clone repository https://github.com/Grzesiek23/MassTransitEFCoreInterceptor
2. Start application
3. Send request for /weatherforecast

It is also not possible to create or remove migrations using Entity Framework tools while having the configuration for an interceptor '.AddInterceptors(sp.GetRequiredService<PublishDomainEventsInterceptor>())'

What is the expected behavior?
Application should work fine while using MassTransit and EF Core SaveChangesInterceptor.
In this scenario, the PublishDomainEventsInterceptor should collect all the events from the aggregate (using EF Core's tracker) and then publish them.
The only workaround now is to define a separate DbContext for handling the MassTransit Outbox functionality.
What actually happened?
It seems that there's a hidden circular dependency occurring in the background.
If you set a breakpoint at the beginning of the get endpoint, it doesn't even hit that breakpoint.
Using the IBus interface does not cause such problems; however, it deprives me of the ability to use "Transactional Outbox" feature.
Related log output, including any exceptions
No response
Link to repository that demonstrates/reproduces the issue
https://github.com/Grzesiek23/MassTransitEFCoreInterceptor

See: https://github.com/MassTransit/MassTransit/discussions/5020
TL;DR - this isn't something MassTransit can fix.

@Grzesiek23 it's an antipattern of course, but you can break the circle by resolving an ipublishendpoint from a service provider in your interceptor

Accessing it from the outside via an IServiceProvider or via the DbContext.GetService means the ISendpointProvider or IPublishEndpoint are of type MassTransit.Context.ConsumeContextScope and not the expected MassTransit.Middleware.Outbox.OutboxSendEndpointProvider. This means it bypasses the outbox and delivers straight to the broker. What am I doing wrong here?

Indeed, sometimes though I do get an outbox sender, for example when saving changes in a controller method.
Saving changes from another job consumer resolves a direct endpoint.

I have a solution for it in this discussion: https://github.com/MassTransit/MassTransit/discussions/5057


Did you delete this folder

Description
Everytime i lauch the app it will show the message "Did you delete this folder?"  and all other folders will display the same message
Steps To Reproduce
Open the app and it happens
Steps to fix
want to access the app without message displaying everytime
Files Version
<IP_ADDRESS>
Windows Version
Windows 11 home 22H2 22621.963
Relevant Assets/Logs
debug.log

Where is it set to open?

Where is it set to open?

i dont know where it is set to open i just download the app from the microsoft store

You can check in Files settings > Preferences > Start-up settings

You can check in Files settings > Preferences > Start-up settings

I try different Start-up settings and Its not working. Also the same message appears when i activate show/hide hidden folder option.
The pat is wrong that the file.exe is in the

2.4.3 might fix the issue but Files should be opening to the Home page not the broken path

The 2.4.3 update didnt fix it and have tried changing the start up settings

The same 2.4.3 didn't fix it.
Also "edit" & "remove" is not activated in Preference/Start-up/pages

Can you open a separate bug report for the preferences

<IP_ADDRESS> "Did you delete this folder" disappear. So i think the bug is fixed.

It still happens when executing 'files' from cmd or powershell.

the new <IP_ADDRESS> update did fix the bug


remove AMS API page size limit

Description

remove AMS API request page size limit completely
tested with organization with 29k clusters:

with current 10k limit, it has to make 3 request to get the full data set
page size 10k takes 4-5sec (so 12-14sec to get the full data)
page size -1 (get all 29k clusters at once) takes 9-10sec

Fixes # (issue)
Type of change
Please delete options that are not relevant.

Configuration update

Testing steps
via ocm-cli, making the same query as smart-proxy does, with token from 29k clusters org
Checklist

[x] make before_commit passes
[x] updated documentation wherever necessary
[x] added or modified tests if necessary
[x] updated schemas and validators in insights-data-schemas in case of input/output change

Codecov Report
Patch and project coverage have no change.

Comparison is base (194b466) 69.33% compared to head (8833696) 69.33%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1101   +/-   ##
=======================================
  Coverage   69.33%   69.33%
=======================================
  Files          25       25
  Lines        3662     3662
=======================================
  Hits         2539     2539
  Misses        867      867
  Partials      256      256

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


⚠ Bofrost.at has degraded performance

In 1c59ceb, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1741 ms

Resolved: Bofrost.at performance has improved in b16260b.


nameReplaceRegexp is not working

Hello!
I am trying to configure my own figma-export.yml but I am having issues with nameReplaceRegexp. I tried even with the examples you give in config.md but I cannot make it work... I may be doing something wrong or maybe I simply do not understand what is this param used for... but could you tell me if these params are ok? Basically, all I want is to append "ic_" to the beginning of the icon name.
icons:
output: "icons"
format: svg
nameValidateRegexp: '^[a-z A-Z0-9_]+$'
nameReplaceRegexp: 'ic_$1'
Thank you very much!

Hello.
$1 — means the first capture group but you don’t have a capture group in the nameValidateRegexp. Add round braces to add a capture group.
^([a-z A-Z0-9_]+)$

Good morning,
I had tried that before writing the comment but it is still not working... I have these colors: content_bubbles, content_inverse_primary, content_negative, etc. With this yml it should get the whole name as first group and get color_content_bubbles, color_content_inverse_primary, color_content_negative and so on, right?
colors:
    # [optional] RegExp pattern for color name validation before exporting
    nameValidateRegexp: '^([a-z A-Z0-9_]+)$' # RegExp pattern for: background, background_primary, widget_primary_background
    # [optional] RegExp pattern for replacing. Supports only $n
    nameReplaceRegexp: 'color_$1'

Oh... forget it, I was setting these values in Android side, not in common...
Thank you very much anyway.


Typo in the CODE_OF_CONDUCT.md

Describe the bug

Typo in the CODE_OF_CONDUCT.md
To Reproduce
Steps to reproduce the behavior:

Go to 'CODE_OF_CONDUCT.md'
Scroll down the file at subsection :

Expected Behaviour
Reporting and Enforcement

See error

Additional context

I am working on it

So @timabbott sir ,should I open a PR for this change 8c0cd1b only

Closing since #11999 was merged


Point to latest API reference

@roji It's already there and also tracked by https://github.com/dotnet/EntityFramework.Docs/issues/4837


[PosMinting] Better of the two same tokens :)

Hi,
I believe this line https://github.com/stratisproject/StratisBitcoinFullNode/blob/master/src/Stratis.Bitcoin.Features.Miner/Staking/PosMinting.cs#L288 should be changed from
await this.GenerateBlocksAsync(walletSecret, this.stakeCancellationTokenSource.Token)

to
await this.GenerateBlocksAsync(walletSecret, token)

token variable is unused at the moment.

They are actually the same cancellation token, one instance is just passed via the asynchronous loop

Yes. token is still preferable for readers' convenience.

Sure submit a PR if you want to make this change.


Git Issue #308 - Excel file details

Supports .Net45 and .NetStandard20 only

Hi,
Thanks, but this will require some changes to be accepted. The code adds an overload of the CreateOpenXmlReader factory method which returns only the creator field. This does not fit so well within the general design of the library.
Here are some suggestions how to implement this feature:

The creator should be added as a new property on the IExcelDataReader interface
The property must be added and "wired up" through the internal ExcelDataReader class and IWorkbook interface
The property should ideally be implemented in both the XlsxWorkbook and XlsWorkbook classes (also CsvWorkbook, but can return null)

For XSLX:

Add a helper in the ZipWorker class to return the stream for docProps/core.xml, named like GetDocPropsStream(). This is pretty much the same code as the other Get*Stream() helpers
Then, add helpers in the XlsxWorkbook class to parse the stream and extract the creator, named like ReadDocProps(). This is similar code to the other Read*() helpers
There should be tests for XLSXes where docProps/core.xml both is present and absent

For XLS:

There needs to be a new XlsBiffWriteAccess class which parses the author string out of the BIFF record described in "2.4.349 WriteAccess"
Then, the XlsBiffStream class must support the new BIFF record
Then, add code in XlsWorkbook.ReadWorkbookGlobals to extract the creator field
There should be tests for all BIFF versions (only important if the string layout differs, but I didnt check)

If you want to focus only on XLSX for now, then that's fine. It is easier to implement for XLS later once the initial plumbing work has been done :)

thanks for the review, I'll made some changes as per the design of the library


Discussion: Configuration web interface

Is it too crazy to think this bot could be configured via a web interface?
With sliders, input fields for the api keys, etc?
I am no web designer, but I can totally hack an html file for all the configuration options. But I wonder, would people want this? I find it tedious to have to change the config file just to switch up or down the minlending. or to see if something works or not.

The reason I've been avoiding this issue is security... currently the web interface is "read only" - that's simple with no risk for your API KEY or someone manipulating your bot.

Well, I used an apache proxy to set this up, so the web interface is actually protected by apache. I use a configuration file similar to this:
`Listen 20001 https

SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
    <Proxy *>
        AuthType Basic
        AuthName "Authentication Required"
        AuthUserFile "/opt/pollenbot/.htpasswd"
        Require valid-user
    </Proxy>

ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/
`
And I set the variable customWebServerAddress to <IP_ADDRESS>:8000
That way the web page is password protected over SSL/TLS

Basic Authentication is nice for protecting access to private information (basically counting that attacker won't gain value), I would rely on it to protect API Access to my funds.

I was talking about telegram api keys. not poloniex ones. True, I would not trust my api key to be recovered over html, in fact, I would make that an option you can set but not one you can read. Makes sense?

The problem is that you need to give a write permission somewhere (an POST handler), which needs more security considerations...
I do see this in the future, currently the effort to make it right (reduce the risk) is too high in my opinion.
I would prefer getting good Market Analysis so I don't need to change the configuration. :)

Oh, you mean something like "Run with this coin" and that it makes everything it can to get the maximum rate automatically? that sounds like a good idea and a more on the returns money than is convenient side. I like it.

What we could do, is start another web server that will only listen on local host and starts on a different port to the one we have.
Then if people wanted to expose that to the web, they'd

Have to do it themselves.
Hopefully know what they're doing.

I can definitely see the benefits of this for people who aren't comfortable with editing text files too. If we ever managed to get installable packages or hosted on PyPi, this would be really useful.
All the page really needs to do is write a file, we wouldn't need to hook straight into the variables in the bot. We could even leave out the Polo API keys if it was going to problematic.
That said, I'm definitely more focused on the market analysis stuff at the minute too.
We're already close to the feature you're talking about @kryztoval we've a basic version of MACD working, which builds upon the current market analysis tool.

@laxdog Amazing, and sounds good.
I market this as discussion because I guessed this would be low priority as it would be helpful but it is not important or urgent.

I think it would be really nice to have a configuration web interface. i can see the security-point and i would recommend this: web interface that outputs the content for the configuration-file. if you could create a html-file ( http://getbootstrap.com/components/ ), i would be happy to complete it.

I've started work on this on the FlaskWebServer branch

Still a lot more to do, though it should allow for updates to live config and also saving that to disk if required.


fix bug for load pretrained sharded model when train with lora

PR types

Bug fixes
PR changes

Others
Description

When train the lora model and load from full-parameter pretrained sharded model, we need to delete the fixed parameter in optimizer.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Ruipeng Jia seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Renogy randomly disconnects (v0.13)

While watching the Device List in the remote console, the Serialbattery will randomly show disconnected, it will reconnect after a few moments (less than a minute, will time next it happens).
Will continue to monitor to see if I can find a cause or pattern.

Venus GX (Victron OEM)
Firmware Version v2.91
Battery:
Renogy Smart Lithium 100AH
Cells: 4
Interface: Renogy USB to RS485 OEM Cable (no other devices connected to battery)
Copy of current log when it happens here:
@40000000633e00a2209ddc74   File "/opt/victronenergy/dbus-serialbattery/renogy.py", line 148, in read_temp_data
@40000000633e00a22147a164     self.temp2 = unpack('>H',temp2)[0] / 10
@40000000633e00a22147c48c TypeError: a bytes-like object is required, not 'bool'
@40000000633e00d0198ecefc INFO:SerialBattery:Starting dbus-serialbattery
@40000000633e00d019acea04 INFO:SerialBattery:dbus-serialbattery v0.13
@40000000633e00d019ed90cc INFO:SerialBattery:Testing LltJbd
@40000000633e00d02b33518c ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e00d02b5c3a34 INFO:SerialBattery:Testing Ant
@40000000633e00d10416787c ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e00d1043c194c ERROR:SerialBattery:>>> ERROR: Incorrect Data
@40000000633e00d1044cede4 INFO:SerialBattery:Testing Daly
@40000000633e00d1153c8fc4 ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e00d1156950cc INFO:SerialBattery:Testing Daly
@40000000633e00d1276486ac ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e00d127a642cc INFO:SerialBattery:Testing Jkbms
@40000000633e00d215a6f9f4 ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e00d2168d0494 INFO:SerialBattery:Testing Sinowealth
@40000000633e00d22f7066cc ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e00d22fa211a4 INFO:SerialBattery:Testing Lifepower
@40000000633e00d31d1390bc ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e00d31fdec67c ERROR:SerialBattery:>>> ERROR: Incorrect Data
@40000000633e00d320d2272c INFO:SerialBattery:Testing Renogy
@40000000633e00d33603d7bc ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e00d3362f44ec INFO:SerialBattery:Testing Renogy
@40000000633e00d40e02efdc INFO:SerialBattery:RENOGY RBT100LFP12S-G1
@40000000633e00d4229877dc INFO:SerialBattery:Connection established to Renogy
@40000000633e00d425b5e094 INFO:SerialBattery:Battery connected to dbus from /dev/ttyUSB2
@40000000633e00d4261ad83c INFO:SerialBattery:=== Settings ===
@40000000633e00d4262d52b4 INFO:SerialBattery:> Connection voltage NoneV | current NoneA | SOC None%
@40000000633e00d4263c3b1c INFO:SerialBattery:> Cell count 4 | cells populated 4
@40000000633e00d42eefb57c INFO:SerialBattery:> CCL Charge NoneA | DCL Discharge NoneA
@40000000633e00d42f6cd4bc INFO:SerialBattery:> MIN_CELL_VOLTAGE 2.9V | MAX_CELL_VOLTAGE 3.45V
@40000000633e00d5165b424c INFO:SerialBattery:DeviceInstance = 1
@40000000633e00d516968a14 INFO:SerialBattery:com.victronenergy.battery.ttyUSB2
@40000000633e00db1c22fecc ERROR:SerialBattery:>>> ERROR: Incorrect Reply
@40000000633e00f234326764 ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e00f234e4e2cc Traceback (most recent call last):
@40000000633e00f234e530ec   File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 163, in publish_battery
@40000000633e00f234e54474     success = self.battery.refresh_data()
@40000000633e00f234e5502c   File "/opt/victronenergy/dbus-serialbattery/renogy.py", line 72, in refresh_data
@40000000633e00f234e55fcc     result = result and self.read_temp_data()
@40000000633e00f234e56b84   File "/opt/victronenergy/dbus-serialbattery/renogy.py", line 148, in read_temp_data
@40000000633e00f234e72cbc     self.temp2 = unpack('>H',temp2)[0] / 10
@40000000633e00f234e74044 TypeError: a bytes-like object is required, not 'bool'
@40000000633e011c15538a94 INFO:SerialBattery:Starting dbus-serialbattery
@40000000633e011c156783dc INFO:SerialBattery:dbus-serialbattery v0.13
@40000000633e011c15ac7834 INFO:SerialBattery:Testing LltJbd
@40000000633e011c26067964 ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e011c2631272c INFO:SerialBattery:Testing Ant
@40000000633e011c3779b6ac ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e011c37aa7724 ERROR:SerialBattery:>>> ERROR: Incorrect Data
@40000000633e011c37d5d0cc INFO:SerialBattery:Testing Daly
@40000000633e011d0dc569dc ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e011d0dedf0dc INFO:SerialBattery:Testing Daly
@40000000633e011d21f8e064 ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e011d2228702c INFO:SerialBattery:Testing Jkbms
@40000000633e011d32cda35c ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e011d32fbac84 INFO:SerialBattery:Testing Sinowealth
@40000000633e011e07e9cb84 ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e011e0810a0ec INFO:SerialBattery:Testing Lifepower
@40000000633e011e1c0852ac ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e011e1c2d014c ERROR:SerialBattery:>>> ERROR: Incorrect Data
@40000000633e011e1c3dba8c INFO:SerialBattery:Testing Renogy
@40000000633e011e2daf26fc ERROR:SerialBattery:>>> ERROR: No reply - returning
@40000000633e011e2e2d0d74 INFO:SerialBattery:Testing Renogy
@40000000633e011f043314b4 INFO:SerialBattery:RENOGY RBT100LFP12S-G1
@40000000633e011f0d933e1c INFO:SerialBattery:Connection established to Renogy
@40000000633e011f0da6f4fc INFO:SerialBattery:Battery connected to dbus from /dev/ttyUSB2
@40000000633e011f0e197964 INFO:SerialBattery:=== Settings ===
@40000000633e011f0e5eac3c INFO:SerialBattery:> Connection voltage NoneV | current NoneA | SOC None%
@40000000633e011f0e859cfc INFO:SerialBattery:> Cell count 4 | cells populated 4
@40000000633e011f0ed89b14 INFO:SerialBattery:> CCL Charge NoneA | DCL Discharge NoneA
@40000000633e011f10b8c4f4 INFO:SerialBattery:> MIN_CELL_VOLTAGE 2.9V | MAX_CELL_VOLTAGE 3.45V
@40000000633e011f2214d4a4 INFO:SerialBattery:DeviceInstance = 1
@40000000633e011f22882bfc INFO:SerialBattery:com.victronenergy.battery.ttyUSB2

Hi Tim
The protocol doc is in the old ticket #12
Most of these cheaper BMS only have 1,2 or 3 temp sensors, and not a sensor for each cell. So which cell that min/max temp belongs too is not known, and so also not in their protocol.

I just updated to 14.3, no change however.
I also just added a second renogy battery but serialbattery only finds the one on the bus, possibly the driver does not yet support multiple batteries or this newer battery (self heated smart) has a different ID.
@4000000063b651681a37fb94 INFO:SerialBattery:Testing Renogy
@4000000063b651682c8e70d4 INFO:SerialBattery:RENOGY RBT100LFP12S-G1
@4000000063b65168347e54e4 INFO:SerialBattery:Connection established to Renogy
@4000000063b6516834916f84 INFO:SerialBattery:Battery Renogy connected to dbus from /dev/ttyUSB1
@4000000063b6516834a05404 INFO:SerialBattery:=== Settings ===
@4000000063b6516834b3e3d4 INFO:SerialBattery:> Connection voltage NoneV | current NoneA | SOC None%
@4000000063b6516834c41c2c INFO:SerialBattery:> Cell count 4 | cells populated 4
@4000000063b6516834d33f2c INFO:SerialBattery:> CCCM SOC True | DCCM SOC True
@4000000063b6516834e16444 INFO:SerialBattery:> CCCM CV True | DCCM CV True
@4000000063b6516834ef5a7c INFO:SerialBattery:> CCCM T True | DCCM T True
@4000000063b6516834fe566c INFO:SerialBattery:> MIN_CELL_VOLTAGE 2.9V | MAX_CELL_VOLTAGE 3.45V
@4000000063b65169064ad50c INFO:SerialBattery:DeviceInstance = 2
@4000000063b65169068c71ec INFO:SerialBattery:com.victronenergy.battery.ttyUSB1
@4000000063b652db07bf7b7c ERROR:SerialBattery:>>> ERROR: No reply - returning
@4000000063b652db2ee2e054 ERROR:SerialBattery:>>> ERROR: Incorrect Reply
@4000000063b652db2f833b1c Traceback (most recent call last):
@4000000063b652db2f836de4   File "/opt/victronenergy/dbus-serialbattery/dbushelper.py", line 193, in publish_battery
@4000000063b652db2f83816c     success = self.battery.refresh_data()
@4000000063b652db2f838d24   File "/opt/victronenergy/dbus-serialbattery/renogy.py", line 68, in refresh_data
@4000000063b652db2f839cc4     result = result and self.read_temp_data()
@4000000063b652db2f83a87c   File "/opt/victronenergy/dbus-serialbattery/renogy.py", line 144, in read_temp_data
@4000000063b652db2f8565cc     self.temp2 = unpack('>H',temp2)[0] / 10
@4000000063b652db2f85756c TypeError: a bytes-like object is required, not 'bool'
@4000000063b6530a06a122cc INFO:SerialBattery:Starting dbus-serialbattery
@4000000063b6530a06b60a5c INFO:SerialBattery:dbus-serialbattery v0.14.3
@4000000063b6530a0725fa9c INFO:SerialBattery:Testing LltJbd
@4000000063b6530a187ee59c ERROR:SerialBattery:>>> ERROR: No reply - returning
@4000000063b6530a18a7e99c INFO:SerialBattery:Testing Ant
@4000000063b6530a2d06f07c ERROR:SerialBattery:>>> ERROR: No reply - returning
@4000000063b6530a2d2c6e24 ERROR:SerialBattery:>>> ERROR: Incorrect Data
@4000000063b6530a2d3cf884 INFO:SerialBattery:Testing Daly
@4000000063b6530b04dcf4fc ERROR:SerialBattery:>>> ERROR: No reply - returning
@4000000063b6530b05127064 INFO:SerialBattery:Testing Daly
@4000000063b6530b16b32264 ERROR:SerialBattery:>>> ERROR: No reply - returning
@4000000063b6530b16d99df4 INFO:SerialBattery:Testing Jkbms
@4000000063b6530b28351164 ERROR:SerialBattery:>>> ERROR: No reply - returning
@4000000063b6530b28729764 INFO:SerialBattery:Testing Lifepower
@4000000063b6530c01b399ac ERROR:SerialBattery:>>> ERROR: No reply - returning
@4000000063b6530c01dfba8c ERROR:SerialBattery:>>> ERROR: Incorrect Data
@4000000063b6530c01f0930c INFO:SerialBattery:Testing Renogy
@4000000063b6530c1391c9dc INFO:SerialBattery:RENOGY RBT100LFP12S-G1
@4000000063b6530c1cb2f644 INFO:SerialBattery:Connection established to Renogy
@4000000063b6530c1ded00cc INFO:SerialBattery:Battery Renogy connected to dbus from /dev/ttyUSB1
@4000000063b6530c1e512584 INFO:SerialBattery:=== Settings ===
@4000000063b6530c1e8d9dfc INFO:SerialBattery:> Connection voltage NoneV | current NoneA | SOC None%
@4000000063b6530c1f31adfc INFO:SerialBattery:> Cell count 4 | cells populated 4
@4000000063b6530c1f7e7e0c INFO:SerialBattery:> CCCM SOC True | DCCM SOC True
@4000000063b6530c1f8fd38c INFO:SerialBattery:> CCCM CV True | DCCM CV True
@4000000063b6530c1f9ec7ac INFO:SerialBattery:> CCCM T True | DCCM T True
@4000000063b6530c1fae021c INFO:SerialBattery:> MIN_CELL_VOLTAGE 2.9V | MAX_CELL_VOLTAGE 3.45V
@4000000063b6530c2ce654d4 INFO:SerialBattery:DeviceInstance = 2
@4000000063b6530c2d29a34c INFO:SerialBattery:com.victronenergy.battery.ttyUSB1

Ah now I see why, the current implementation of the code assumes that the RS485 address of a BMS device is unique to a manufacturer.  There is no routine to scan all RS485 addresses and check for a battery BMS type at each address.
For example it assumes Renogy would be:
{"bms": "Renogy", "address": b"\x30"}, #x30=48 dec
{"bms": "Renogy", "address": b"\xF7"}, #xF7=247 dec
Yet a Renogy battery could be address 01-247 (x01-xF7).

Added some more debug to various modules and was able to find the addresses of both my batteries.  One is address 0 and the other is address 1.  This took me a while to find as the debug code was not spitting out which RS485 address it found so I added some logger info for that:
@4000000063b6fc893060f4d4 INFO:SerialBattery:-------------------------------------------------------------------------------
@4000000063b6fc8930725ddc INFO:SerialBattery:Starting dbus-serialbattery
@4000000063b6fc8930832aa4 INFO:SerialBattery:dbus-serialbattery v0.14.3.timtest
@4000000063b6fc89309395c4 INFO:SerialBattery:Battery to be tested is:
@4000000063b6fc8930aa9c4c INFO:SerialBattery:{'bms': 'Renogy', 'address': b'1'}
@4000000063b6fc8930badc74 INFO:SerialBattery:Testing Renogy
@4000000063b6fc8930e46544 INFO:SerialBattery:Address = b'1'
@4000000063b6fc8a076cbbe4 INFO:SerialBattery:RENOGY RBT100LFP12SH-G1
@4000000063b6fc8a0fcb1164 INFO:SerialBattery:Connection established to Renogy
@4000000063b6fc8a0fdd2a34 INFO:SerialBattery:Battery Renogy connected to dbus from /dev/ttyUSB1
@4000000063b6fc8a0feba53c INFO:SerialBattery:=== Settings ===

Found the newer Renogy Protocol spec and have been testing with some other code snippets from another author, now things are making a little more sense.
When scanning addresses x01-xF7, I find my two batteries at 0x48 and 0x49.  It's not perfect yet but at least I can most of the registers from multiple batteries on the RS485 bus with that code.

Manufacture Version      0x13fe    0100                00110000 00110001 00110000 00110000
Main Line Version        0x13ff    0001                00110000 00110000 00110000 00110001
Comms Protocl Version    0x1401    19                  00110001 00111001
Battery Name             0x1402    RBT100LFP12SH-G1    01010010 01000010 01010100 00110...
Software Version         0x140a    0131                00110000 00110001 00110011 00110001
Manufacturer             0x140c    RENOGY              01010010 01000101 01001110 01001...

Manufacture Version      0x13fe    0100                00110000 00110001 00110000 00110000
Main Line Version        0x13ff    0001                00110000 00110000 00110000 00110001
Comms Protocl Version    0x1401    02                  00110000 00110010
Battery Name             0x1402    RBT100LFP12S-G1     01010010 01000010 01010100 00110...
Software Version         0x140a    0014                00110000 00110000 00110001 00110100
Manufacturer             0x140c    RENOGY              01010010 01000101 01001110 01001...

Lithium.Iron.Battery.BMS.Modbus.Protocol.V1.7.zh-CN.en.1.pdf

So judging by the original error where it tried to unpack a Boolean variable, I suspect the code tried to read temp2 which does not exist on this battery, so the read function returned false and the unpack of course failed since it expect a byte string and not a bool.
Simply adding a check to see if reading temp2 returns false should cover it (we already had a check for temp1).
I'll improve the code by reading how many Environmental sensors are in the battery and then only populate temp1 or temp2 based on this, while adding checks to ensure we exit if any temp value read returns a false.
Something along this lines:
def read_temp_data(self):
#OLD temp1 = self.read_serial_data_renogy(self.command_bms_temp1)
#OLD temp2 = self.read_serial_data_renogy(self.command_bms_temp2)
    # Check to see how many Enviromental Temp Sensors this battery has, it may have none.
    num_env_temps = self.read_serial_data_renogy(self.command_env_temp_count)
    logger.info('Number of Enviromental Sensors = %s', num_env_temps)

    if (num_env_temps == 0):
        return False

    if (num_env_temps == 1):
        temp1 = self.read_serial_data_renogy(self.command_env_temp1)

    if temp1 is False:
        return False
    else:
        self.temp1 = unpack(">H", temp1)[0] / 10
        logger.info('temp1 = %s °C', temp1)

    if (num_env_temps == 2):
        temp2 = self.read_serial_data_renogy(self.command_env_temp2)

    if temp2 is False:
        return False
    else:
        self.temp2 = unpack(">H", temp2)[0] / 10
        logger.info('temp2 = %s °C', temp2)

    return True

Thanks for the testing and update. I'll update it to the driver as soon as I can.
For now the driver assume one serial connection per BMS. Perhaps we can add some settings in future.

Your fix will be included in the next release.
Did you connect multiple BMS to one RS485 adapter? https://github.com/Louisvdw/dbus-serialbattery/issues/142


Add Action to CheckResponse

Add item Action to struct CheckResponse to get the recommended action.

Implemented in version v3


Include optional colormaps in "nolearn/lasagne/visualize.py" ?

Hi there,
I think that the function visualize.py should include as input an optional colormap parameter, in order to see the plots as each one likes. Now the colormap "gray" is set in the function, so you can't even change it outside.
Best regards

The functions in visualize.py return the plot object. I don't know whether this works, but maybe it's possible to override some attributes and re-draw the images.
If this does not work, it would probably best to be able to pass arbitrary kwargs, since others might want to change other parameters.

That was my point. I think it is so much easier to just pass arbitrary arguments, since the output (plot object as you said) is already drawn with gray color map, and I don't think it is possible to override the atributes.

I see a problem though, since there is not always just one plot. E.g., in _plot_head_map, there are 3 subplots, which all could have different parameters. Having a general solution could quickly become a mess. If you see any clean way to do it, please post it and we could implement that solution.


Crashes when includes file the second time.

If classes from a file are already in repository, a mergeRepository method in StylishRepository.swift will fail.

Fixed. Now new class with the same name as in repository won't be added. Will be in version 0.91.1.


Breaking change of assertEquals(Object, Object) in TestNG >= 6.9.4

Preamble
I'm not sure whether this is actually a bug in TestNG or the expected behavior. In the latter case consider it a change/feature request.
The issue
I am currently trying to upgrade TestNG to 7.0.0 and I found that version 6.9.4 changed the behavior of Assert.assertEquals.
It was: expected.equals(actual)
It now is: expected.equals(actual) && actual.equals(expected)
For us, this breaks our tests, as in some cases we get java.sql.Timestamp (a subclass of java.util.Date) from OpenJPA where we declare the type to be java.util.Date. Now, while java.util.Date's equals() just compares the result of getTime(), java.sql.Timestamp reqiures other to be an instance of java.sql.Timestamp.
In TestNG up to including 6.8.21 this is no issue, as expected in our test is always a java.util.Date.
In general
There is no requirement for equals() to be commutative. In addition, some frameworks just don't allow to define the actual class of a return value (like OpenJPA returning a Timestamp for a Date in the example above). And sometimes there is even just no way to forge an expected object, which would satisfy actual.equals(expected) (think of: Function returns an instance of SomeInterface. I can implement SomeInterface, but the framework's actual, internal implementation will probably check for instanceof itself and hence never equal instances my forged class).
I propose to revert assertEquals and restrict it to expected.equal(acutal). In cases where it is really needed, the current behavior could still be acheived using assertEquals(one, other); assertEquals(other, one).
TestNG Version
All >= 6.9.4
Test case sample
Date one = new java.util.Date();
Date other = new java.sql.Timestamp(one.getTime());

Assert.assertEquals(one.getTime(), other.getTime());
Assert.assertEquals(other, one); // Fails on anyting >= 6.9.4, but succeds on 6.8.21
Assert.assertEquals(one, other); // Fails on all

EDIT: The commit in question seems https://github.com/cbeust/testng/commit/18788dcf8b825f4e62e3a25bd9530786172a16ec, but it does not give any motivation on why this was changed.

Motivation is here: https://github.com/cbeust/testng/pull/490 and seems legit.
Your need is in a bit too specific and arguable. You should look at a more powerful assert library like https://joel-costigliola.github.io/assertj/index.html but I don't know if it will manage your need.
I close the issue as it is working as expected


Not working behind a proxy

Served has problems running behind a proxy. Post your issues here
@K2ouMais

The next problem I was having is with GNUPG. It seems that it doesnt accept the proxy.
When the proxy is in the command the containers stops completely from build and it doesnt exit anymore.

I am trying to find a proxy I can use so I can test it out myself :) It is hard to fix without having the same set up

Yes I know how hard it is.
I am also trying to find a way.
I will let you know if I find something usefull.

I have made it add the proxy to the Docker file now. You may try installing this now
composer require sinnbeck/laravel-served:dev-proxy

Be sure to add these to you served.php config file, just after 'name' => env('SERVED_NAME'),
'proxy' => [
        'http' => env('SERVED_HTTP_PROXY', ''),
        'https' => env('SERVED_HTTPS_PROXY', ''),
    ],

I found a way to get through GNUPG.
I had to change the keyserver and add my proxy.
Now I am having a problem with redis and PECL.
I could bet it is the proxy again.
gpg --batch --keyserver-options http-proxy=${http_proxy} --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key"; \

Thanks for the feedback. I will add the proxy in there if it is set :)
Can you test the above branch to see if that works ? It sets the proxy for all images and all containers

Here is a fully functional Dockerfile.
For Redis to install correctly:
pear config-set http_proxy ${http_proxy}
For GNUPG to retrieve the key correctly:
gpg --batch --keyserver-options http-proxy=${http_proxy} --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key";
Keyserver can be a real pain to get working.
FROM library/php:7.4-fpm

# disable warnings for "dangerous" messages
ENV http_proxy http://my.proxy.de:3128
ENV https_proxy http://my.proxy.de:3128
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1

# Adding linux packages
RUN pear config-set http_proxy ${http_proxy} \
    && apt-get update \
    && apt-get install -y unzip zip gnupg \
    && rm -rf /var/lib/apt/lists/*

# Installing packages for sql dump
RUN set -ex; \
     key='A4A9406876FCBD3C456770C88C718D3B5072E1F5'; \
     export GNUPGHOME="$(mktemp -d)"; \
     gpg --batch --keyserver-options http-proxy=${http_proxy} --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key"; \
     gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/mysql.gpg; \
     gpgconf --kill all; \
     rm -rf "$GNUPGHOME"; \
     apt-key list > /dev/null

RUN echo "deb http://repo.mysql.com/apt/debian/ buster mysql-8.0" > /etc/apt/sources.list.d/mysql.list \
    && apt-get update \
    && apt-get install -y mysql-community-client postgresql-client sqlite3 \
    && rm -rf /var/lib/apt/lists/*

# add development php.ini file
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
# add a local user with the same uid as the local
# prepare empty composer config directory
# ensure user owns its home directory
ARG uid
RUN useradd -G root -u $uid -d /home/served served \
    && mkdir -p /home/served/.composer \
    && chown -R served:served /home/served

# add composer
# set composer to use https
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
    && runuser -l served -c "composer config --global repos.packagist composer https://packagist.org"
# Adding NPM
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash \
    && apt-get install -y nodejs \
    && curl -L https://www.npmjs.com/install.sh | sh

# Adding php packages
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
RUN install-php-extensions pdo_mysql pdo_pgsql redis zip bcmath

# Set work dir
WORKDIR /app

Now it only seems I have to handle some permissions, because I am in Windoww ;o(

Does it work if you move this line
pear config-set http_proxy ${http_proxy}

Down to the installation of the php packages
# Adding php packages
RUN pear config-set http_proxy ${http_proxy}
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
RUN install-php-extensions pdo_mysql pdo_pgsql redis zip bcmath

Yes it does work.
It only have to be before you install any PECL package.
FROM library/php:7.4-fpm

# disable warnings for "dangerous" messages
ENV http_proxy http://my.proxy.de:3128
ENV https_proxy http://my.proxy.de:3128
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1

# Adding linux packages
RUN apt-get update \
    && apt-get install -y unzip zip gnupg \
    && rm -rf /var/lib/apt/lists/*

# Installing packages for sql dump
RUN set -ex; \
     key='A4A9406876FCBD3C456770C88C718D3B5072E1F5'; \
     export GNUPGHOME="$(mktemp -d)"; \
     gpg --batch --keyserver-options http-proxy=${http_proxy} --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key"; \
     gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/mysql.gpg; \
     gpgconf --kill all; \
     rm -rf "$GNUPGHOME"; \
     apt-key list > /dev/null

RUN echo "deb http://repo.mysql.com/apt/debian/ buster mysql-8.0" > /etc/apt/sources.list.d/mysql.list \
    && apt-get update \
    && apt-get install -y mysql-community-client postgresql-client sqlite3 \
    && rm -rf /var/lib/apt/lists/*

# add development php.ini file
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
# add a local user with the same uid as the local
# prepare empty composer config directory
# ensure user owns its home directory
ARG uid
RUN useradd -G root -u $uid -d /home/served served \
    && mkdir -p /home/served/.composer \
    && chown -R served:served /home/served

# add composer
# set composer to use https
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
    && runuser -l served -c "composer config --global repos.packagist composer https://packagist.org"
# Adding NPM
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash \
    && apt-get install -y nodejs \
    && curl -L https://www.npmjs.com/install.sh | sh

# Adding php packages
RUN pear config-set http_proxy ${http_proxy}
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/
RUN install-php-extensions pdo_mysql pdo_pgsql redis zip bcmath

# Set work dir
WORKDIR /app

I will make an update soon. I am just having some issues with gpg --batch --keyserver hpk://80.pool.sks-keyservers.net:80 --recv-keys A4A9406876FCBD3C456770C88C718D3B5072E1F5 not working for me. "No keyserver available".

I think it is because of the hpk protocoll.
Maybe we have to search for a keyserver that works for both.

I have found it here, but I am unable to get it working with port 80 sadly.
http://keys.gnupg.net/pks/lookup?search=0x8C718D3B5072E1F5&fingerprint=on&op=index
gpg --batch --keyserver hpk://keys.gnupg.net:80 --recv-keys 8C718D3B5072E1F5

Does it work if you do
RUN set -ex; \
     key='A4A9406876FCBD3C456770C88C718D3B5072E1F5'; \
     export GNUPGHOME="$(mktemp -d)"; \
     gpg --batch --keyserver-options http-proxy=${http_proxy} --keyserver p80.pool.sks-keyservers.net --recv-keys "$key"; \
     gpg --batch --export "$key" > /etc/apt/trusted.gpg.d/mysql.gpg; \
     gpgconf --kill all; \
     rm -rf "$GNUPGHOME"; \
     apt-key list > /dev/null

Nevermind. Got it working with your config now. Removed my docker dns settings, and it suddenly worked. New version has been pushed.

I was about to write that is doesnt work.
Will try the new version.
Thanks

Should I wait for a new release or should I get it from the proxy branch?

Just require it again, and it should give you the latest version :)
composer require sinnbeck/laravel-served:dev-proxy

You have a typo in the Dockerfile.
-keyserver-options sould be --keyserver-options.
You had some php extensions enabled in the past, that now arent in the Dockerfile anymore.
pdo_pgsql and redis
I am now getting a problem with composer, but that could be on my side. I will take a look...

Both are fixed. You can add your wanted extensions to this array in served.php
'modules' => [
            'pdo_mysql',
            'zip',
            'bcmath',
        ],

Yes I saw that to late.
Now I am getting an Nginx error:

Great we are making progress! :+1:
It might be because the --env stuff should go before the image name. I have tried moving it. require again to get the newest.

Now I just one more thing to say...

Thank you for all this.

Yay! :) I assume the urls work as well?
Be aware that you manually need to import the certificate for chrome to work :)
https://github.com/sinnbeck/laravel-served#web

Yes, the URLs are woking and I see my vanilla Laravel application.
I will take a look at your link.
Thank you again.

New version is out with prox support: v0.7.0

Thank you very much for the mention and thanks again for this package.

Glad to be of help :) Just happy that it works now


Exams

No surname in form (

Даніленко Володимир

Даніленко
ср, 5 січ. 2022 р. о 17:04 Timur Shemsedinov @.***>
пише:

No surname in form (
—
Reply to this email directly, view it on GitHub
https://github.com/HowProgrammingWorks/Exams/pull/35#issuecomment-1005764112,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AL7WCGI5U43YMPL23QBND73UURMXPANCNFSM5LFEIFGQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>


UpdateAdmitted event processing

This PR adds handling for the new WorkflowExecutionUpdateAdmitted event ("UAdm") that the server is going to start sending for reapplied updates (i.e. after reset / conflict resolution).
If the server does request an update by sending the new event type, then:

It will not send a protocol message.
The event will have the update request payload.
If the update is accepted, then the server will write a WorkflowExecutionUpdateAccepted event ("UAcc") without the request payload.

Implementation notes

During non-replay, the server may send UAdm: in this case we create the corresponding protocol message so that the validator and handler are executed.

If we encounter a UAdm event during replay then we also create the protocol message, but hold it to one side until we find out whether the update was accepted or not.

When handling a UAcc event during replay we first look to see if we have a UAdm protocol message held to one side for us; if we do then we use that, since that has the request payload and in this situation the UAcc event will not have the payload.

If an update has no UAdm events then the new implementation reduces to the previous implementation: i.e. we respond to protocol messages received during non-replay, and we respond to UAcc during replay by creating the protocol message.

How this was tested
This samples-python script against this WIP server branch

Handling the remaining activations in the test so that panic doesn't happen would be good

@Sushisource I've done that in https://github.com/temporalio/sdk-core/pull/700/commits/03e65364c44df66e89d62fb87174d5288125b5da, but not in a very satisfying way:
    // There is an activation containing a RemoveFromCache job left unhandled
    replay_worker.poll_workflow_activation().await.unwrap();

This may be unimportant details but while I'm learning core: is it obvious to you why there's an activation left consisting of [RemoveFromCache] when we complete the post-reset workflow execution, but there wasn't earlier in the test, when we completed the pre-reset workflow execution, or indeed in your pre-existing test update_workflow?
I thought perhaps the [RemoveFromJob] activation would be added every time we complete an activation with a CompleteWorkflowExecution command, in which case I could have dealt it at that point, but that doesn't seem to be the case.

Here's the backtrace at the point responsible where we call `create_evict_activation`:
    { fn: "temporal_sdk_core_protos::coresdk::workflow_activation::create_evict_activation", file: "/Users/dan/src/temporalio/sdk-core/sdk-core-protos/src/lib.rs", line: 467 },
    { fn: "temporal_sdk_core::worker::workflow::managed_run::ManagedRun::update_to_acts", file: "./src/worker/workflow/managed_run.rs", line: 918 },
    { fn: "temporal_sdk_core::worker::workflow::managed_run::ManagedRun::check_more_activations", file: "./src/worker/workflow/managed_run.rs", line: 313 },
    { fn: "temporal_sdk_core::worker::workflow::workflow_stream::WFStream::process_post_activation", file: "./src/worker/workflow/workflow_stream.rs", line: 380 },
    { fn: "temporal_sdk_core::worker::workflow::workflow_stream::WFStream::build_internal::{{closure}}", file: "./src/worker/workflow/workflow_stream.rs", line: 132 },
    { fn: "<T as futures_util::fns::FnMut1<A>>::call_mut", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/fns.rs", line: 28 },
    { fn: "<futures_util::stream::stream::map::Map<St,F> as futures_core::stream::Stream>::poll_next::{{closure}}", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/str
eam/stream/map.rs", line: 59 },
    { fn: "core::option::Option<T>::map", file: "/rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/option.rs", line: 1072 },
    { fn: "<futures_util::stream::stream::map::Map<St,F> as futures_core::stream::Stream>::poll_next", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/stream/stream/ma
p.rs", line: 59 },
    { fn: "<futures_util::stream::stream::map::Map<St,F> as futures_core::stream::Stream>::poll_next", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/stream/stream/ma
p.rs", line: 58 },
    { fn: "<futures_util::stream::stream::Inspect<St,F> as futures_core::stream::Stream>::poll_next", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/lib.rs", line: 10
2 },
    { fn: "<futures_util::stream::stream::take_while::TakeWhile<St,Fut,F> as futures_core::stream::Stream>::poll_next", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src
/stream/stream/take_while.rs", line: 80 },
    { fn: "futures_util::stream::stream::StreamExt::poll_next_unpin", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/stream/stream/mod.rs", line: 1638 },
    { fn: "<futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.30/src/stream/stream/next.rs
", line: 32 },
    { fn: "temporal_sdk_core::worker::workflow::Workflows::new::{{closure}}::{{closure}}", file: "./src/worker/workflow/mod.rs", line: 213 },
    { fn: "<tokio::task::local::RunUntil<T> as core::future::future::Future>::poll::{{closure}}", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/task/local.rs", line: 978 },
    { fn: "tokio::task::local::LocalSet::with::{{closure}}", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/task/local.rs", line: 730 },
    { fn: "std::thread::local::LocalKey<T>::try_with", file: "/rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/thread/local.rs", line: 286 },
    { fn: "std::thread::local::LocalKey<T>::with", file: "/rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/thread/local.rs", line: 262 },
    { fn: "tokio::task::local::LocalSet::with", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/task/local.rs", line: 728 },
    { fn: "<tokio::task::local::RunUntil<T> as core::future::future::Future>::poll", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/task/local.rs", line: 968 },
    { fn: "tokio::task::local::LocalSet::run_until::{{closure}}", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/task/local.rs", line: 635 },
    { fn: "<core::pin::Pin<P> as core::future::future::Future>::poll", file: "/rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/future/future.rs", line: 123 },
    { fn: "tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/sch
eduler/current_thread/mod.rs", line: 659 },
    { fn: "tokio::runtime::coop::with_budget", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/coop.rs", line: 107 },
    { fn: "tokio::runtime::coop::budget", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/coop.rs", line: 73 },
    { fn: "tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/curren
t_thread/mod.rs", line: 659 },
    { fn: "tokio::runtime::scheduler::current_thread::Context::enter", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/current_thread/mod.rs", line: 404 },
    { fn: "tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/current_thread/mod.
rs", line: 658 },
    { fn: "tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/current_thread/mod.rs"
, line: 737 },
    { fn: "tokio::runtime::context::scoped::Scoped<T>::set", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/context/scoped.rs", line: 40 },
    { fn: "tokio::runtime::context::set_scheduler::{{closure}}", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/context.rs", line: 176 },
    { fn: "std::thread::local::LocalKey<T>::try_with", file: "/rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/thread/local.rs", line: 286 },
    { fn: "std::thread::local::LocalKey<T>::with", file: "/rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/thread/local.rs", line: 262 },
    { fn: "tokio::runtime::context::set_scheduler", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/context.rs", line: 176 },
    { fn: "tokio::runtime::scheduler::current_thread::CoreGuard::enter", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/current_thread/mod.rs", line: 737 }
,
    { fn: "tokio::runtime::scheduler::current_thread::CoreGuard::block_on", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/current_thread/mod.rs", line: 64
6 },
    { fn: "tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/current_thread/
mod.rs", line: 175 },
    { fn: "tokio::runtime::context::runtime::enter_runtime", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/context/runtime.rs", line: 65 },
    { fn: "tokio::runtime::scheduler::current_thread::CurrentThread::block_on", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/scheduler/current_thread/mod.rs", line
: 167 },
    { fn: "tokio::runtime::runtime::Runtime::block_on", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/runtime/runtime.rs", line: 349 },
    { fn: "tokio::task::local::LocalSet::block_on", file: "/Users/dan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.37.0/src/task/local.rs", line: 592 },
    { fn: "temporal_sdk_core::worker::workflow::Workflows::new::{{closure}}", file: "./src/worker/workflow/mod.rs", line: 192 },


Feature: allow both key and component in a ff-data-table column definition

I have data of the format:
[
  {
    name: 'foo'
    type: {
        id: 123,
        name: 'my-type'
   }
  }
]

I want a table with two columns - name and type. For the type column, I want to use a custom component that knows how to render a type object.
Currently, I can set component in the column definition to provide the custom component, but it always gets bound to the full data item.
columns: [
                { label: 'Name', key: 'name' },
                { label: 'Type', component: { is: markRaw(TeamTypeCell) }, sortable: true }
]

Because of that, I have to define the custom component to receive the top level property name (type) and then access its properties to get the details of the object. But that makes the component less portable as it might not always have a top level property name of type.
I would like the ability to also specify key to bind a particular value to the component, rather than the whole thing.
columns: [
                { label: 'Name', key: 'name' },
                { label: 'Type', key: 'type', component: { is: markRaw(TeamTypeCell) }, sortable: true }
]

With that, the component can just define its properties as those of the type object without needing to know the top level property name.

One thing that will trip this particular proposed solution is that key is used for sorting. The component does currently support the use of both, but it uses key for sorting-only. We do also have the map option for the component, which enables a re-mapping of properties, but this doesn't support nested properties. It is this latter feature that we should seek to build.

I'm hitting this again with the new Admin Project view I'm working on - and I'm not really clear on the preferred resolution.
I have an array of projects in the following form (simplified here)
[
   {
      id: "project-id",
      name: "a project",
      team: {
          id: "team-id",
          name: "name"
      }
   }
]

In the table, I want the first column to be the Project Name, the second column the Team Name. However, I don't want to just display the raw property - I want to use the common component we have for displaying Team Names.
The existing component expects to receive the props id and name of the team. With the current data table, it receives the id and name of the project.
As a workaround, I've added team as a prop of the component and updated it to use that if present: {{ team ? team.id : id }}.
That works visually, but now I cannot sort the table based on the team column - because it doesn't know how to sort objects, rather than more primitive types.
So the sort feature needs a way to support nested properties (eg team.name), whilst retaining the fact that logically the column is showing the team property.

I have raised #51 that adds support for nested properties in both the key and map properties.
Some more thought is needed around how the filter functionality should apply here - but that can be done another time.


Certificate signed by unknown authority when using nexus image repo

While using the test command to check for latest tags from nexus image repository an error is observed about unknown certificate.
I've configured the registries conf and used insecure: true, yet the image-updater pod trying to access my registry using https.
two question:

how to disable SSL verification for an image registry
how to add certificate to the image-updater pod.. I did not see any documentation about that.

for example:
argocd-image-updater test nexus3:2000/nginx
error received:
could not tags: Get "https://nexus3:2000/v2": x509 certificate signed by unknown authority application=test image_alias= image_name="nexus3:2000/nginx registry_url="nexus3:2000"
side note:
Argocd server is up and running and have the certificate in question added as config map.

Can you please share your registries.conf?

Same issue with docker hub (https://registry-1.docker.io)

i got the some problem

Hi team,
I'm having the exact same issue....
Do we have anything on how to add certificate to the image-updater pod?
It would be great if the pod would have used the same config maps as argocd server pod but any workaround will be great for short term.
Thanks !

I have the same problem, running v0.12.0 on arm64.
time="2022-06-02T20:03:03Z" level=error msg="Could not get tags from registry: Get \"https://registry-1.docker.io/v2/\": x509: certificate signed by unknown authority" alias=image application=[...] image_name=[...] image_tag=[...] registry=

This seems to no longer be an issue in the image tagged "latest" so hopefully it's fixed in 0.13.0 :)

Please verify this for version 0.13.0
We are using the ARM arch and v.0.12.0 have this issue while latest does not!

I am facing the same issue. I have tried using latest, but still the issue remains.
Any update on when the release with the fix would be out?

Not sure if it works but something like this "should"
FROM quay.io/argoprojlabs/argocd-image-updater:v0.12.0

COPY <CertName>.crt /usr/local/share/ca-certificates/<CertName>.crt
RUN update-ca-certificates

Substituting <CertName> for your cert if its locally next to the dockerfile

Same issue with private, self-hosted repository with certificate signed by Let's encrypt.
Any news on this?

I have also encountered this issue using v0.12.0. Following the discussion I have set up the following configuration:
(after updating to latest tag*)
apiVersion: v1
data:
  log.level: debug
  registries.conf: | # set up registry for nexus
    registries:
    - name: corpnexus
      prefix: "corpnexus.corp.my-org.net:8082"
      default: true
      api_url: https://corpnexus.corp.my-org.net:8082
      insecure: true
kind: ConfigMap
metadata:
  annotations:
  creationTimestamp: "2023-04-02T10:39:10Z"
  labels:
    app.kubernetes.io/name: argocd-image-updater-config
    app.kubernetes.io/part-of: argocd-image-updater
  name: argocd-image-updater-config
  namespace: gitops

I executed into the argocd-image-updater pod and tested the connection to nexus:
# content of app/config inside argocd-image-updater container (k8s)
/app/config $ ls
registries.conf  ssh

# content of regisries config
/app/config $ cat registries.conf
registries:
- name: corpnexus
  prefix: "corpnexus.corp.my-org.net:8082"
  default: true
  api_url: https://corpnexus.corp.my-org.net:8082
  insecure: true

# Testing connection to nexus
/app/config $ argocd-image-updater test corpnexus.corp.my-org.net:8082/digital/my-org.digital.an_app/build_sprint_13_an_app --registries-conf-path
 ./registries.conf
DEBU[0000] Creating in-cluster Kubernetes client
INFO[0000] retrieving information about image            image_alias= image_name="corpnexus.corp.my-org.net:8082/digital/my-org.digital.an_app/build_sprint_13_an_app" registry_url="corpnexus.corp.my-org.net:8082"
DEBU[0000] rate limiting is disabled                     prefix="corpnexus.corp.my-org.net:8082" registry="https://corpnexus.corp.my-org.net:8082"
DEBU[0000] Setting default registry endpoint to corpnexus.corp.my-org.net:8082
DEBU[0000] Previous default registry was docker.io
INFO[0000] Loaded 1 registry configurations from ./registries.conf
INFO[0000] Fetching available tags and metadata from registry  application=test image_alias= image_name="corpnexus.corp.my-org.net:8082/digital/my-org.digital.an_app/build_sprint_13_an_app" registry_url="corpnexus.corp.my-org.net:8082"
INFO[0000] Found 1 tags in registry                      application=test image_alias= image_name="corpnexus.corp.my-org.net:8082/digital/my-org.digital.an_app/build_sprint_13_an_app" registry_url="corpnexus.corp.my-org.net:8082"
DEBU[0000] could not parse input tag latest as semver: Invalid Semantic Version
INFO[0000] no newer version of image found               application=test image_alias= image_name="corpnexus.corp.my-org.net:8082/digital/my-org.digital.an_app/build_sprint_13_an_app" registry_url="corpnexus.corp.my-org.net:8082"

This seems to solve the issue, note: without directing the test command to configuration file it will fail.
i.e., : argocd-image-updater test corpnexus.corp.my-org.net:8082/digital/my-org.digital.an_app/an_app --registries-conf-path ./registries.conf

I had to add docker hub to the list of registries with insecure option set to true to make image updater work with images from docker hub.
apiVersion: v1
data:
  log.level: debug
  registries.conf: |
    registries:
    - name: docker.io
      prefix: docker.io
      default: true
      api_url: https://registry-1.docker.io
      insecure: true
kind: ConfigMap
metadata:
  name: argocd-image-updater-config
  namespace: argocd