[Device Support Request] Legrand Wireless Smart Dimmer with Netatmo WNRL63

Is your feature request related to a problem? Please describe.
https://www.legrand.us/wiring-devices/radiant-collection/dimmers/smart-tru-universal-dimmer-with-netatmo/p/wnrl63wh
This device pairs with ZHA, but none of the four buttons (on, off, dim-up, dim-down) show up for automatons, and all the button presses show "No handler for cluster command" in the logs.
Describe the solution you'd like
I'm requesting proper support for this device.
Device signature
{
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=1, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4129, maximum_buffer_size=89, maximum_incoming_transfer_size=63, server_mask=10752, maximum_outgoing_transfer_size=63, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0104",
"in_clusters": [
"0x0000",
"0x0001",
"0x0003",
"0x000f",
"0x0020",
"0xfc01"
],
"out_clusters": [
"0x0000",
"0x0003",
"0x0006",
"0x0008",
"0x0019",
"0xfc01"
]
}
},
"manufacturer": " Legrand",
"model": " Remote dimmer switch",
"class": "zigpy.device.Device"
}
Log panel
New device 0x1527 (64:62:66:ff:fe:61:5f:e6) joined the network
[0x1527] Scheduling initialization
Tries remaining: 3
[0x1527] Requesting 'Node Descriptor'
Tries remaining: 2
[0x1527] Extending timeout for 0x5b request
Device 0x1527 (64:62:66:ff:fe:61:5f:e6) joined the network
[0x1527] Scheduling initialization
[0x1527] Canceling old initialize call
Received frame on uninitialized device  from ep 0 to ep 0, cluster 19: b"\x00'\x15\xe6_a\xfe\xfffbd\x80"
[0x1527:zdo] ZDO request ZDOCmd.Device_annce: [0x1527, 64:62:66:ff:fe:61:5f:e6, 128]
Tries remaining: 3
[0x1527] Requesting 'Node Descriptor'
Tries remaining: 2
[0x1527] Extending timeout for 0x5d request
Received frame on uninitialized device  from ep 0 to ep 0, cluster 32770: b"]\x00'\x15\x12@\x80!\x10Y?\x00\x00*?\x00\x00"
[0x1527] Got Node Descriptor: NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=1, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4129, maximum_buffer_size=89, maximum_incoming_transfer_size=63, server_mask=10752, maximum_outgoing_transfer_size=63, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)
[0x1527] Discovering endpoints
Tries remaining: 3
[0x1527] Extending timeout for 0x5f request
Received frame on uninitialized device  from ep 0 to ep 0, cluster 54: b'\x02\xb4\x01'
[0x1527:zdo] ZDO request ZDOCmd.Mgmt_Permit_Joining_req: [180, <Bool.true: 1>]
Received frame on uninitialized device  from ep 0 to ep 0, cluster 32773: b"_\x00'\x15\x01\x01"
[0x1527] Discovered endpoints: [1]
[0x1527] Initializing endpoints [<Endpoint id=1 in=[] out=[] status=<Status.NEW: 0>>]
[0x1527:1] Discovering endpoint information
Tries remaining: 3
[0x1527] Extending timeout for 0x61 request
Received frame on uninitialized device  from ep 0 to ep 0, cluster 32772: b'a\x00'\x15"\x01\x04\x01\x04\x01\x01\x06\x00\x00\x03\x00\x0f\x00 \x00\x01\x00\x01\xfc\x07\x03\x00\x06\x00\x08\x00\x00\x00\x01\xfc\x19\x00\x00\x00'
[0x1527:1] Discovered endpoint information: SizePrefixedSimpleDescriptor(endpoint=1, profile=260, device_type=260, device_version=1, input_clusters=[0, 3, 15, 32, 1, 64513], output_clusters=[3, 6, 8, 0, 64513, 25, 0])
[0x1527] Extending timeout for 0x63 request
[0x1527:1:0x0000] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=99 command_id=Command.Read_Attributes_rsp>
[0x1527] Read model ' Remote dimmer switch' and manufacturer ' Legrand' from <Endpoint id=1 in=[basic:0x0000, identify:0x0003, binary_input:0x000F, poll_control:0x0020, power:0x0001, manufacturer_specific:0xFC01] out=[identify:0x0003, on_off:0x0006, level:0x0008, basic:0x0000, manufacturer_specific:0xFC01, ota:0x0019] status=<Status.ZDO_INIT: 1>>
[0x1527] Discovered basic device information for
Device is initialized
Checking quirks for  Legrand  Remote dimmer switch (64:62:66:ff:fe:61:5f:e6)
Considering <class 'zhaquirks.xbee.xbee_io.XBeeSensor'>
Fail because endpoint list mismatch: {232, 230} {1}
Considering <class 'zhaquirks.xbee.xbee3_io.XBee3Sensor'>
Fail because endpoint list mismatch: {232, 230} {1}
Considering <class 'zhaquirks.smartthings.tag_v4.SmartThingsTagV4'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.smartthings.multi.SmartthingsMultiPurposeSensor'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.netvox.z308e3ed.Z308E3ED'>
Fail because device_type mismatch on at least one endpoint
Considering <class 'zhaquirks.gledopto.soposhgu10.SoposhGU10'>
Fail because endpoint list mismatch: {11, 13} {1}
Considering <class 'bellows.zigbee.application.EZSPCoordinator'>
Fail because device_type mismatch on at least one endpoint
device - 0x1527:64:62:66:ff:fe:61:5f:e6 entering async_device_initialized - is_new_join: True
device - 0x1527:64:62:66:ff:fe:61:5f:e6 has joined the ZHA zigbee network
[0x1527]( Remote dimmer switch): started configuration
[0x1527:ZDO]( Remote dimmer switch): 'async_configure' stage succeeded
[0x1527] Extending timeout for 0x65 request
[0x1527] Extending timeout for 0x67 request
[0x1527:1:0x0000]: finished channel configuration
[0x1527] Extending timeout for 0x69 request
Error handling '_save_attribute' event with (64:62:66:ff:fe:61:5f:e6, 1, 0, 4, ' Legrand') params: FOREIGN KEY constraint failed
Error handling '_save_attribute' event with (64:62:66:ff:fe:61:5f:e6, 1, 0, 5, ' Remote dimmer switch') params: FOREIGN KEY constraint failed
[0x1527:1:0x000f]: bound 'binary_input' cluster: Status.SUCCESS
[0x1527] Extending timeout for 0x6b request
[0x1527:1:0x0001]: bound 'power' cluster: Status.SUCCESS
[0x1527] Extending timeout for 0x6d request
[0x1527:1:0x0020]: bound 'poll_control' cluster: Status.SUCCESS
[0x1527] Extending timeout for 0x6f request
[0x1527:1:0x000f] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=107 command_id=Command.Configure_Reporting_rsp>
[0x1527:1:0x000f]: Successfully configured reporting for '{'present_value': (30, 900, 1)}' on 'binary_input' cluster: [ConfigureReportingResponseRecord(status=0)]
[0x1527:1:0x000f]: finished channel configuration
[0x1527] Extending timeout for 0x71 request
[0x1527:1:0x0001] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=109 command_id=Command.Configure_Reporting_rsp>
[0x1527:1:0x0001]: Successfully configured reporting for 'set()' on 'power' cluster
[0x1527:1:0x0001]: Failed to configure reporting for '['battery_voltage', 'battery_percentage_remaining']' on 'power' cluster: [ConfigureReportingResponseRecord(status=140, direction=0, attrid=32), ConfigureReportingResponseRecord(status=134, direction=0, attrid=33)]
[0x1527:1:0x0001]: finished channel configuration
[0x1527] Extending timeout for 0x73 request
[0x1527:1:0x0008]: bound 'level' cluster: Status.SUCCESS
[0x1527:1:0x0008]: finished channel configuration
[0x1527:1:0x0019]: finished channel configuration
[0x1527:1:0x0006]: bound 'on_off' cluster: Status.SUCCESS
[0x1527:1:0x0006]: finished channel configuration
[0x1527:1:0x0020] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=111 command_id=Command.Write_Attributes_rsp>
[0x1527:1:0x0020]: 3300.0s check-in interval set: [[WriteAttributesStatusRecord(status=<Status.SUCCESS: 0>)]]
[0x1527:1:0x0020]: finished channel configuration
[0x1527:1:0x000f]: 'async_configure' stage succeeded
[0x1527:1:0x0001]: 'async_configure' stage succeeded
[0x1527:1:0x0000]: 'async_configure' stage succeeded
[0x1527:1:0x0020]: 'async_configure' stage succeeded
[0x1527:1:0x0008]: 'async_configure' stage succeeded
[0x1527:1:0x0006]: 'async_configure' stage succeeded
[0x1527:1:0x0019]: 'async_configure' stage succeeded
[0x1527]( Remote dimmer switch): completed configuration
[0x1527]( Remote dimmer switch): stored in registry: ZhaDeviceEntry(name=' Legrand  Remote dimmer switch', ieee='64:62:66:ff:fe:61:5f:e6', last_seen=1641168116.1792417)
[0x1527] Extending timeout for 0x75 request
[0x1527:1:0x0003] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=117 command_id=Command.Default_Response>
[0x1527:1:0x0003]: executed 'trigger_effect' command with args: '(2, 0)' kwargs: '{}' result: [64, <Status.SUCCESS: 0>]
[0x1527]( Remote dimmer switch): started initialization
[0x1527:ZDO]( Remote dimmer switch): 'async_initialize' stage succeeded
[0x1527:1:0x000f]: initializing channel: from_cache: False
[0x1527] Extending timeout for 0x77 request
[0x1527:1:0x0001]: initializing channel: from_cache: False
[0x1527] Extending timeout for 0x79 request
[0x1527:1:0x0000]: initializing channel: from_cache: False
[0x1527:1:0x0000]: finished channel initialization
[0x1527:1:0x0020]: initializing channel: from_cache: False
[0x1527:1:0x0020]: finished channel initialization
[0x1527:1:0x0008]: initializing channel: from_cache: False
[0x1527:1:0x0008]: finished channel initialization
[0x1527:1:0x0006]: initializing channel: from_cache: False
[0x1527:1:0x0006]: finished channel initialization
[0x1527:1:0x0019]: initializing channel: from_cache: False
[0x1527:1:0x0019]: finished channel initialization
[0x1527:1:0x000f] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=119 command_id=Command.Read_Attributes_rsp>
[0x1527:1:0x000f]: finished channel initialization
[0x1527:1:0x0001] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=121 command_id=Command.Read_Attributes_rsp>
[0x1527] Extending timeout for 0x7b request
[0x1527:1:0x0001] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=123 command_id=Command.Read_Attributes_rsp>
[0x1527:1:0x0001]: finished channel initialization
[0x1527:1:0x000f]: 'async_initialize' stage succeeded
[0x1527:1:0x0001]: 'async_initialize' stage succeeded
[0x1527:1:0x0000]: 'async_initialize' stage succeeded
[0x1527:1:0x0020]: 'async_initialize' stage succeeded
[0x1527:1:0x0008]: 'async_initialize' stage succeeded
[0x1527:1:0x0006]: 'async_initialize' stage succeeded
[0x1527:1:0x0019]: 'async_initialize' stage succeeded
[0x1527]( Remote dimmer switch): power source: Battery or Unknown
[0x1527]( Remote dimmer switch): completed initialization
[0x1527:1:0x0000] ZCL deserialize: <ZCLHeader frame_control= manufacturer=4129 tsn=1 command_id=Command.Read_Attributes>
[0x1527:1:0x0000] ZCL request 0x0000: [[61440]]
[0x1527:zdo] ZDO request ZDOCmd.Node_Desc_rsp: [<Status.SUCCESS: 0>, 0x1527, NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=1, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4129, maximum_buffer_size=89, maximum_incoming_transfer_size=63, server_mask=10752, maximum_outgoing_transfer_size=63, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)]
[0x1527:zdo] No handler for ZDO request:ZDOCmd.Node_Desc_rsp([<Status.SUCCESS: 0>, 0x1527, NodeDescriptor(logical_type=<LogicalType.EndDevice: 2>, complex_descriptor_available=0, user_descriptor_available=1, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress: 128>, manufacturer_code=4129, maximum_buffer_size=89, maximum_incoming_transfer_size=63, server_mask=10752, maximum_outgoing_transfer_size=63, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False)])
[0x1527:1:0x0020] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=2 command_id=0>
[0x1527:1:0x0020] ZCL request 0x0000: []
[0x1527:1:0x0020] No handler for cluster command 0
[0x1527:1:0x0020]: Received 2 tsn command 'checkin': []
[0x1527] Extending timeout for 0x02 request
[0x1527:1:0x0020] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=2 command_id=Command.Default_Response>
[0x1527:1:0x0020]: executed 'checkin_response' command with args: '(True, 8)' kwargs: '{'tsn': 2}' result: [0, <Status.SUCCESS: 0>]
[0x1527] Extending timeout for 0x7e request
[0x1527:1:0x0020] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=126 command_id=Command.Default_Response>
[0x1527:1:0x0020]: executed 'set_long_poll_interval' command with args: '(24,)' kwargs: '{}' result: [2, <Status.UNSUP_CLUSTER_COMMAND: 129>]
[0x1527] Extending timeout for 0x80 request
[0x1527:1:0x0020] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=128 command_id=Command.Default_Response>
[0x1527:1:0x0020]: executed 'fast_poll_stop' command with args: '()' kwargs: '{}' result: [1, <Status.SUCCESS: 0>]
[0x1527:1:0x0006] ZCL deserialize: <ZCLHeader frame_control= manufacturer=None tsn=3 command_id=1>
[0x1527:1:0x0006] ZCL request 0x0001: []
[0x1527:1:0x0006] No handler for cluster command 1

When you listen to zha_event in the developer tools, events in Home Assistant, do you get any output when you press the buttons?


Question: How better remove subscriptions in component without recreate it?

Look at my code:
@TakeUntilDestroy()
@Component({/* somу code */})
export class PageMessageComponent implements OnInit, OnDestroy {
	public ngOnInit(): void {
		this.loadData();

		this.translateService.onLangChange.subscribe(() => {
			// here I want remove subscriptions and in loadData create them again
			this.loadData();
		});
	}

	public ngOnDestroy(): void {
		this.appService.setPageCode('');
	}

	private loadData(): void {
		this.newsService.getItems()
			.pipe(untilDestroyed(this))
			.subscribe(news => {
				this.news = news;
				this.isLoaded = true;
			});
	}

My question is: how is best way to destroy all subscriptions in onLangChange and run them again? Because after language change I need load another data for current component.
Maybe I can run this.ngOnDestroy(); - it's normal?

Maybe this construction will be better:
How can I manually unsubscribe all subscription who marked as .pipe(untilDestroyed(this)) operator?

You can't. This is the whole purpose of this library. It will unsubscribe only when the component destroyed.

But if I will use @TakeUntilDestroy('destroy') and call this method anywhere in my logic then this will be works?

Closing.


[BUG] StructsToJson and ScanJson should return true only for true and false only for false.

Describe the bug
ScanJson appears to be doing the right thing here more often than from_json.
StructToJson will return true for some unquoted values that look like they might be numbers. An unquoted 1E0 for example returns true instead of null.
Both of them have issues with quoted strings and will return true for "true", and false for "false", when they should both be null.

I think this is a duplicate of #4779


Feature/add platform to docker

Now you can specify platform param in the cmd args
llama stack build --template local --image-type docker  --platform "linux/amd64" --name llama-stack
resolves #253

Closing since it is pretty stale and the review not responded to. Please feel free to re-open if you want to finish it.


EventRequest-CodeUnit-96- function- CreatePurchHeader

Kindly add below code in CodeUnit 96 Purch.-Quote to Order - CreatePurchHeader Function.
PurchOrderHeader."No." := '';
PurchOrderHeader."Quote No." := "No.";
**

OnBeforePurchOrderInit(PurchOrderHeader,PurchHeader);

**
PurchOrderHeader.InitRecord;
PurchOrderLine.LOCKTABLE;
PurchOrderHeader.INSERT(TRUE);

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.


Attendees

OpenTasks information can be mapped to VTODO, and the latter can contain ATTENDEEs.

Support ATTENDEEs for tasks.

Right. The provider has some initial support for this: https://github.com/dmfs/opentasks/blob/76dbaa7aed46bbbc955c568ff89012932dbcf89e/opentasks-contract/src/main/java/org/dmfs/tasks/contract/TaskContract.java#L1444
This is not finalized though.

It would be nice if DavX5 can store in the tables of OpenTasks for the beginning the attendees so that downloading a VTODO from a CalDAV server with attendees, editing in OpenTasks and synchronizing/updating will not silently delete the participants.
Adding the attendees to the UI can be done later.


Turbo will not navigate to URLs that have a . in the pathname

https://github.com/hotwired/turbo/blob/98cdc4037788f078a741c7fb50412db0101bcb97/src/core/url.ts#L27-L29
It looks like that this behavior is intended, guessing it prevents Turbo from running when users are downloading a file. The problem is that routes with . are valid in Rails routes, so, if you tried to navigate to routes like:

https://github.com/hotwired/turbo/releases/tag/v7.1.0
https://github.com/hotwired/turbo/blob/main/CONTRIBUTING.md

Turbo won't even try to navigate to them.

@packagethief You just looked at this, right? We're doing this to prevent Turbo from trying to load .jpg and .mp4 etc.

There’s some related discussion here: https://github.com/hotwired/turbo/pull/519

Yes, we discussed beginning in https://github.com/hotwired/turbo/pull/519#issuecomment-1021393141 and the conclusion was  that we should introduce API so applications can customize.
We just need to decide on what that API should look like. Originally I'd imagined hanging something off the Turbo global, but we don't have precedent for that. It also seems like it will lead to unwieldy heuristics as applications try to encapsulate all possible paths.
I'm liking the suggestion in https://github.com/hotwired/turbo/pull/519#issuecomment-1125729064, which is that we assume all URLs are turbo-visitable by default, and require applications to annotate the ones that aren't. Turbo will already avoid following links annotated [download], and this feels conceptually similar. We could suggest using data-turbo=false for this, which would already Just Work, or we could introduce a new annotation like type. I can't see a reason to introduce a new attribute when data-turbo already exists.

Yeah, we need to be backward compatible, so we can't change the default behavior.
I think the simplest thing to do is expose something on Turbo.session. The raw implementation of isHTML() isn't a very friendly thing to override though. That's what I think could get unwieldy. Maybe something more granular, that passes the extracted extension? Turbo.session.extensionIsHTML(extension).

This is an example of what I consider unwieldy, just to quantify it:
https://discuss.hotwired.dev/t/how-to-make-turbo-drive-work-with-php-files-and-query-strings/2020/2
This is too onerous for official API. Now that I think more about it, the lack of a good idea for appropriate API is the main reason we didn't add this years ago. So, suggestions appreciated!

I do like the idea proposed in #519 , where they are exposing a isVisitable function that can be overridden. Maybe it could be improved to make the function receive the extension instead of full URL like you mentioned, but it allows Turbo the keep the default and allows users to change it as they seem fit.

I don't think we need new API. We could just extend URL and use it internally. Then it will be passed to isVisitable. Obviously first think to implement in inherited class would be extension method.

Or alternatively keep extensions in their own separate array attribute. So if certain extension should be turbo-enabled just push it there. And if more flexibility is needed reassign isVisitable.
But is it really needed?
    let components = testing.pathname.split("/").slice(1);
    let lastPathComponent = components.slice(-1)[0];
    let extension = (lastPathComponent.match(/\.[^.]*$/) || [])[0] || "";

    return location.origin === testing.origin && !!extension.match(/^(?:|\.(?:htm|html|xhtml|aspx))$/)

can be written as just:
let parts = url.pathname.split('/').pop(-1).split('.')

return (parts.length > 1) && ['doc', 'txt'].includes(parts.pop(-1))

With better defaults (addition of php - common issue) I think it may not be worth the effort and single function would be more readable.

I would like to add that it would be nice if data-turbo=true does what it says, I'm not sure #519 is doing that (but I could be mistaken).
Global config is nice and all for PHP folks, etc. but I currently am in the situation that I don't want it globally. Think one route working like GitHubs source browsing.
I'm fine with putting turbo=true on all of them but currently it just gets ignored because Turbo doesn't deem it visitable despite me explicitly telling it that it is.

@2called-chaos It doesn't. I think that this is a separate bug/issue. Right now its value could be true or false but I think it should accept 3 values false - always disable turbo, default - run default check (what true does right now) and true - always force turbo visit (not what it does currently). It probably would be what one would expect from it without studying internals.
I have similar project where I have to pass file path as a parameter in a host/controller/path/to/some/file.txt format and what I do is I modify is isHTML to always return true and disable likns that aren't navigable with data-trubo=false.
Cheers
🍷

I think it should accept 3 values

Yeah I think the issue is that you can have Turbo Drive default to off and selectively enable it. That would mean data-turbo=true would be ambiguous if used as force toggle. I reckon a data-turbo-force would be easy though
willFollowLinkToLocation(link: Element, location: URL) {
  return this.elementDriveEnabled(link)
    && locationIsVisitable(location, this.snapshot.rootLocation)
    && this.applicationAllowsFollowingLinkToLocation(link, location)
}

would turn to something like this and I would be happy
willFollowLinkToLocation(link: Element, location: URL) {
  return this.elementDriveEnabled(link)
    && (
      link.getAttribute("data-turbo-force") == "true" ||
      locationIsVisitable(location, this.snapshot.rootLocation)
    )
    && this.applicationAllowsFollowingLinkToLocation(link, location)
}

Also how do you overwrite isHTML? I'm too dumb when it comes to es6 module scopes apparently

Yes, I don't think it will be often used but true and false don't cover all use cases.
As for overwriting isHTML its not so fancy 😃 I just have a local branch with isHTML implementation I need and I build Turbo from source using it.

Would love to see https://github.com/hotwired/turbo/pull/519 land!

Yeah I think the issue is that you can have Turbo Drive default to off and selectively enable it. That would mean data-turbo=true would be ambiguous if used as force toggle.

I tentatively disagree with this. Selectively enabling when Drive is off is telling Turbo to handle the link/form/container. I can't imagine why you'd expect Turbo to end up handling where you opted in for any reason, let alone because of a . in the URL.

Just ran into this same issue when using an FQDN as a param at the end of a path (in a Rails app), eg: <a href="/validate/example.com" data-turbo-method="post">. Since the link already included data-turbo-method="post", I was particularly confused why Turbo was ignoring the link and it turning into a GET request.

Yeah, we need to be backward compatible, so we can't change the default behavior.

Since a new major version, aka Turbo 8, is coming up, can this logic now be changed in a breaking way?
I'd personally prefer dropping isHTML(), assuming all links are safe, and relying on adding data-turbo=false to bypass.
However, if that's still too much even for a major release, perhaps the logic could be inverted to become default-allow unless an extension is on the known-unsafe list (containing .jpg, .mp4, etc.)?

Just a note that Rails will often append /my_path.id (i.e. /my_path.23) to a resource if accessing a specific resource. Per this issue this form will be ignored. From #1069.

We are using a specific URL syntax for describing date periodes, containing dots. We suddenly had Turbo do full page refreshes instead of morphing the page for streaming page refreshes. It took quite some debugging to find this issue. I think isHTML is a code smell, because it can't determine the extension of the path correctly in all situations. An URL with a dot is still valid, but Turbo just uses the last part as an extension and tries to determine if it is a HTML request. It is extra confusing because Turbo is just doing a page refresh, so it could already know that the current page it is refreshing is loadable as HTML.
Reading all the comments above, I would like to suggest another possible approach:

The isHTML check is removed and replaced with an isKnownNonHtmlPath. This method returns true when well known extensions like png are included in the path. In that case it is safe to assume we don't want to load with Turbo.
For all other cases, we proceed with the visit. When the request is received, we check the returned mime type do double check if we got HTML.
When a non-HTML response is returned, we make a new request with location.href = '...' to load the request. The second request is a tradeoff for URLs that don't have a known non-HTML extension and links that don't have data-turbo="false" added, but it makes sure the URL is still being loaded. Users have two options to prevent the double request. We could log a message to the console to suggest the user to make improvements to prevent double requests.

I think this approach would be backwards compatible with the current situation and solves most edge cases with the current isHTML approach.

I ran into this issue while making a content management system.  It was important to us that the url matched the file title, and some of the titles are function calls that contain a ".".
My solution was a data attribute on the calling link that stated the href isVisitable.  I pass the link element to the locationIsVisitable function, check for the data attribute, and return true if it exists, else I use the original check of isHTML and isPrfixedBy.  I am not super familiar with the code base so this might not be a great solution.  If anyone is interested I can submit a PR.
I am pretty sure this is backwards compatible, and is nice if you only have a couple urls on your site that have this issue.

@chillenberger in our case that would mean we need to add the isVisitable state to many links. And beforehand we don't know which links that state need. Our URLs contain a dynamic part that might contain a range with .. in it. We use this construction on many index pages and are linking to these pages from many locations. Having to mark each link to be visitable would mean a lot of work.
I think linking to non-HTML pages is a lot less common overall. In our application we only link to things like PDF, CSV and Excel exports. Having to mark these links with data-turbo="false" would be perfectly fine because they are focused on a specific action instead of in the regular navigation flow of the application.


Incorrect dataset link.

Hello,
The link of NLVR2 in DATA.md seems incorrect.

Hi @g475128181
Thanks for the notice :)


add integration tests

Added a few integration tests. These fail on v0.0.10 but pass on current master

Added a few integration tests. These fail on v0.0.10 but pass on current master

Thanks 👍


Bump gke-windows-builder version to 2.5.0

Fixes from version 2.0.0 -> 2.5.0 include:

Add Windows Server 2004 and 20H2 arch's, remove 1909 arch.
Add boot-disk-type flag.
Add logic to create a bucket to copy workspace if not exists
Move the Winrm setup to last step to reduce the chance of failures
Add bootDiskSizeGB option
Disable Windows Defender to avoid accasional docker build failures
Fail the building process if errors happen

/assign @YangLu1031 @ibabou

cc @jeremyje


I612 preprocessing multiuse buildings

As discussed in #612, this issue tackles a few different things:

Up to now, each building's main use was set the wrong way when most of the building area was of the type 'PARKING'
The demands of the building were all set by the building's main use, even in mixed use buildings
Schedules did not distinguish the fact that, for example, 10 people working out at a given time do not generate as much humidity gains as 10 people working in an office at the same time

In order to fix these issues, the following was done:

Adjust calculation such that if most of the building is used for 'PARKING', the next most common use becomes the main use
The archetype values for internal loads, ventilation, heated and electrified are calculated based on an average of the value for each use in the building (rather than being defined for the main use only)
Schedules for each type of internal load, ventilation and occupancy are generated for each building based on the schedule database and the mix of uses in the building. these schedules are normalized by the building's archetypal ventilation demands and internal loads such that the building's value can be defined through the corresponding input shapefile while maintaining the demand profile generated by each use type.

@gabriel-happle please review this PR, It would need to pass first than #664

@martin-mosteiro and @JIMENOFONSECA I have started testing the functions in the properties.py.
Looks good.

If you replace properties_df[column][building]=... with properties_df.loc[building,column]=... you can get rid of those warnings:
C:/Users/Gabriel/Documents/GitHub/CEAforArcGIS/cea/demand/preprocessing/properties.py:253: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  properties_df[column][building] = column_total/people_total
C:/Users/Gabriel/Documents/GitHub/CEAforArcGIS/cea/demand/preprocessing/properties.py:254: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  else: properties_df[column][building] = 0
C:/Users/Gabriel/Documents/GitHub/CEAforArcGIS/cea/demand/preprocessing/properties.py:261: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
  properties_df[column][building] = average

I checked the detailed reports, e.g. for occupancy and internal humidity gains for some created mixed use buildings in the open case study. It seems to produce the indented results.
I think we can merge.
@martin-mosteiro I think you have to update the calc_thermal_load tests in order to pass and maybe you want to get rid of those warnings. Especially the RuntimeWarning: invalid value encountered in true_divide sounds a bit dangerous.

@martin-mosteiro i believe it works quite well, once it passes the tests we can merge. please connect the PR to an issue. thanks!

@gabriel-happle, @JIMENOFONSECA thanks for your review, I'll fix these issues today

The values in the unit test had to be updated since there was an error in the old calculation for water and hot water demand. The thermal loads test now passes on my computer.


search preference params

add missing search parameter "preference"

Oh my. Sorry and thanks for contributing. I will queue up and probably release updated versions this weekend.

Sorry for the delay. Will release a new version soon.


Logging for multiple constraints to be fixed

Describe the bug
Using 'scipy == 1.11.1' with 'bayesian-optimization == 1.4.0' I see that I cannot log if multiple constraints are defined:
def constraint_function_2_dim(x, y):
    return np.array([
        - np.cos(x) * np.cos(y) + np.sin(x) * np.sin(y),
        - np.cos(x) * np.cos(-y) + np.sin(x) * np.sin(-y)]).tolist()

constraint_lower = np.array([-np.inf, -np.inf]).tolist()
constraint_upper = np.array([0., 0.]).tolist()

constraint = NonlinearConstraint(constraint_function_2_dim, constraint_lower, constraint_upper)
optimizer = BayesianOptimization(
    f=target_function,
    constraint=constraint,
    pbounds=pbounds,
    verbose=0, # verbose = 1 prints only when a maximum is observed, verbose = 0 is silent
    random_state=1,
)

logger = JSONLogger(path="./log_multiple_constraints")  # writes logs.json
optimizer.subscribe(Events.OPTIMIZATION_STEP, logger)

optimizer.maximize(
    init_points=2,
    n_iter=10,
)

getting the error:
Object of type ndarray is not JSON serializable
We suggest to fix this way:
modify target_space.py this way:
def res(self):

        if self._constraint is None:
            params = [dict(zip(self.keys, p)) for p in self.params]

            return [
                {"target": target, "params": param}
                for target, param in zip(self.target, params)
            ]
        else:
            params = [dict(zip(self.keys, p)) for p in self.params]

            return [
                {
                    "target": target,
                    "constraint": constraint_value.tolist(),
                    "params": param,
                    "allowed": allowed
                }
                for target, constraint_value, param, allowed in zip(
                    self.target,
                    self._constraint_values,
                    params,
                    self._constraint.allowed(self._constraint_values)
                )
            ]

(basically, adding "tolist()" to constraint_value in the returned list)
Thanks a lot!

Thanks for reporting this bug @valentinafarrelli. :)
I've pushed a fix. It might take some time to get it merged and a release pushed. If you need help installing from the branch with the patch let me know.

Hi,
Thanks a lot for the prompt reply!
Yes, some help to install from the branch with the patch would be appreciated!
Best regards,
Valentina
From: till-m @.>
Sent: Thursday, June 20, 2024 4:34 PM
To: bayesian-optimization/BayesianOptimization @.>
Cc: Gori, Valentina @.>; Mention @.>
Subject: Re: [bayesian-optimization/BayesianOptimization] Logging for multiple constraints to be fixed (Issue #478)
EXTERNAL EMAIL: This email originated outside of our organization. Do not click on any links or open attachments from unexpected or unknown senders unless you can verify the content is safe.
Thanks for reporting this bug @valentinafarrellihttps://github.com/valentinafarrelli. :)
I've pushed a fix. It might take some time to get it merged and a release pushed. If you need help installing from the branch with the patch let me know.

Reply to this email directly, view it on GitHubhttps://github.com/bayesian-optimization/BayesianOptimization/issues/478#issuecomment-2180865736, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVI63WIBJGE57TLHLFSYGWLZILR6NAVCNFSM6AAAAABJTVOPT2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBQHA3DKNZTGY.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

Assuming that you're using pip, you can just run
pip uninstall bayesian-optimization; pip install git+https://github.com/till-m/BayesianOptimization.git@fix-478

If you're using conda, the easiest way is probably to install pip via conda and then install the package via pip.

Thank you!
From: till-m @.>
Sent: Thursday, June 20, 2024 4:49 PM
To: bayesian-optimization/BayesianOptimization @.>
Cc: Gori, Valentina @.>; Mention @.>
Subject: Re: [bayesian-optimization/BayesianOptimization] Logging for multiple constraints to be fixed (Issue #478)
EXTERNAL EMAIL: This email originated outside of our organization. Do not click on any links or open attachments from unexpected or unknown senders unless you can verify the content is safe.

If you're using conda, the easiest way is probably to install pip via conda and then install the package via pip.

Reply to this email directly, view it on GitHubhttps://github.com/bayesian-optimization/BayesianOptimization/issues/478#issuecomment-2180899088, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVI63WOMJR3LNELIQ5MIEPLZILTVTAVCNFSM6AAAAABJTVOPT2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBQHA4TSMBYHA.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

This fix will be published with the next release :)


Streaming I/O

@quizzicus Looks like some tests are failing. Can you make sure this is not due to your changes?

It is due to my changes. halt_on_nonzero wasn't working right, so I set out to fix that. But now some tests are outdated, which I was going to fix today.


stop JPJavaEnv::GetEnv returning (JNIEnv*)NULL

GetEnv can fail and return a NULL JNIEnv which crashes in many places
downstream.  This seems to happen when threads are thrashing.
Instead, detect JNI_EDETACHED and do AttachCurrentThread()
then retry GetEnv.  If it fails again RAISE(JPypeException).

@marscher Thanks for reviewing.  I saw that there was existing work in #211 and so opted for a surgical change to fix the NULL dereference issue without (hopefully) any additional negative impact.  Given the alternative is a JVM crash, I think a potential memory leak may be preferable in the near term.
I was expecting this would need to be assessed with regard to the larger multithreading fixes and was hoping for some insight from you or @baztian or others who understood the impact better.  Thanks for the SO link.
I didn't explicitly add a DetachCurrentThread() because:

I'm naive when it comes to the full scope of the JNI and rest of the codebase. ie. does DetachCurrentThread() invalidate the JNIEnv*?
My assumption from a minimal review was it is likely all of the GetEnv() callers are already expecting the thread to be attached, since the return value is unchecked in many places.

So, it seems the options are, add a DetachCurrentThread() in my patch right after retrieving the JNIEnv* (if that's safe), or understand the existing codebase and proposed multithreading changes to make more extensive modifications.  (I may not be in the best position to do that).
Any thoughts or other ideas?

On 05/14/2017 03:58 PM, mikea1729 wrote:

@marscher https://github.com/marscher Thanks for reviewing. I saw that there was existing work in #211 https://github.com/originell/jpype/issues/211 and so
opted for a surgical change to fix the NULL dereference issue without (hopefully) any additional negative impact. Given the alternative is a JVM crash, I think
a potential memory leak may be preferable in the near term.
probably you're right on this, but we can know, how many threads will be created in this place. In the IPython case, there will be
a one thread for each autocomplete. In a long session this could potentially mess up things.
I was expecting this would need to be assessed with regard to the larger multithreading fixes and was hoping for some insight from you or @baztian
https://github.com/baztian or others who understood the impact better. Thanks for the SO link.
I didn't explicitly add a DetachCurrentThread() because:

I'm naive when it comes to the full scope of the JNI and rest of the codebase. ie. does DetachCurrentThread() invalidate the JNIEnv*?
My assumption from a minimal review was it is likely all of the GetEnv() callers are already expecting the thread to be attached, since the return value is
unchecked in many places.
If we would detach every time in this place, we would also add a lot of overhead. There was another Stack thread about this, but I cant find right now.

I think we should solve the issue of ipython crashing for ipython only (eg. detecting if it is a IPython environment and do the attachment automatically (maybe
without detaching, since ipython is only used for prototyping and not for production). If one really works in a multithreaded environment, he or she has to take
care
of attaching/detaching manually.

So, it seems the options are, add a DetachCurrentThread() in my patch right after retrieving the JNIEnv* (if that's safe), or understand the existing codebase
and proposed multithreading changes to make more extensive modifications. (I may not be in the best position to do that).
Any thoughts or other ideas?

Actually the best thing would be some kind of RAII in C++, but as you said this would involve a lot of refactoring and I do not have the time to do it.
Once I've started to do the same thing on Pythons side by using a context manager, which calls detach automatically, when the block goes out of scope (with even
more overhead involved). I've not measured the impact on performance though. JPypes testsuite isn't a good tool for that, because it does not perform enough
calls. A real world application would be better suited.

Looks like you may not have seen the two "UPDATE" sections since I added them after the initial comment.
Detaching the thread within the same code segment isn't an option.  It would invalidate the JNIEnv* which is the entire reason for calling the function in the first place.
And, it looks like always attaching actually isn't entirely correct either.  But to be clear, the current patch only attaches when the thread is already not attached, so not "double attaching".  There's at least one place where the result is checked for NULL to determine if an existing thread is attached.  But I think it's probably just that one place or a sufficiently small number that could be handled in a correct way without a massive change.  I still contend that in all of the other cases the additional overhead for attaching should be 0 since the caller is expecting the thread to be attached for correct operation.  So attaching should be acceptable.  And, since there is an expectation the thread is already attached, then that implies there should be already a place where it would be detached.  If not, well that's another bug that already exists.  So I'm not fixing that, but not making it worse either, and still fixing a case where the process would crash.
I do agree that some RAII mechanism is the right long term approach, but there doesn't seem to be enough time to do that now, I wonder if a suitable stop-gap approach is possible?  I don't like the idea of fixing it just for IPython.  Detecting that the caller is IPython sounds inaccurate at best.  It's certainly no better than someone just using my fork if it is in fact "not production", and potentially worse in the general case.
When I have some more time, I'll see if I can adjust the patch to only AttachCurrentThread() in the cases where 1) the thread is detached (as in current patch) and 2) the caller expects it to be attached (current patch is too general).  So if I do that right, there should be no extra overhead.  I would still never explicitly detach but as I said above this shouldn't cause a leak for cases I'm adding the attach.  I'll update the PR with an additional commit, so the modification is obvious.  The PR can always be squashed later.

Looks like my clock is out of sync.  Committed 9480610 after I made the previous comment (I had more time than I thought).  Let me know what you think.

It's been a few weeks.  Thought I'd ping to see what the status is on accepting this PR.

Your observation that jnienv handles are not checked in most places seems correct. I think multi-threading was really intended to be handled from Pythons side (Attach-/DetachThread), since it is hard or even impossible to handle this properly in the native code (without hurting performance).
I agree that your patch solves a null deref, but introduces a memleak, because the thread will never be detached again. Probably one can even crash the jvm, by creating tons of Python threads (denial of service). So I can not accept it in this state for the sake of security and stability.
Maybe you're right and we should detach the thread again immediately (and sacrifice some performance). It is at least better to do this in the native rather than the Python code. We can do some benchmarking to see how large the impact really is.

Your observation that jnienv handles are not checked in most places seems correct. I think multi-threading was really intended to be handled from Pythons side (Attach-/DetachThread), since it is hard or even impossible to handle this properly in the native code (without hurting performance).

I'm not sure I'm following you here about the performance implications.  If the code needs the JNIEnv, it must be attached as per the JNI API.  Code that doesn't need it wouldn't attach.  I see no performance issue with native code making this determination and doing it if and only if it is necessary.

I agree that your patch solves a null deref, but introduces a memleak, because the thread will never be detached again. Probably one can even crash the jvm, by creating tons of Python threads (denial of service). So I can not accept it in this state for the sake of security and stability.

Here we disagree.  I've tried to state this multiple times and either I'm being unclear or you're just not understanding my comments.  Let me break this down...again:

So I can not accept it in this state for the sake of security and stability

The basis for this statement is false.  Here's why: As you restated above I create a memleak where there was a null deref.  The memory leak is ONLY in cases where the system would have crashed.  Read that sentence again.  Therefore, the patch makes this codebase MORE stable, not less.  I'm not sure how many different ways I can say this.

Probably one can even crash the jvm, by creating tons of Python threads (denial of service)

Actually, without my patch the system crashes because of the null deref when there are many threads.  WITH my patch the system will NOT crash because of a null deref, and MAY later crash due to memleak, MAY.  This is a strictly better outcome with the patch than without.
Finally, I contend that as implemented, I do not actually leak any more memory in practice then without my patch applied, because the only times I attach, is when the code is already expecting the thread to be attached.  In these cases, if the rest of the codebase is correct, something will detach the thread.  If not, then I've created a memory leak where there was otherwise a complete crash.

Maybe you're right and we should detach the thread again immediately (and sacrifice some performance). It is at least better to do this in the native rather than the Python code. We can do some benchmarking to see how large the impact really is.

I did not suggest detaching "right away".  The detach would have to happen much later keeping more state and require refactoring the code.  If you read my original explanation more closely, you'd see that you cannot detach the thread immediately after obtaining the JNIEnv* because detach invalidates it.
I would really like to see this PR accepted.  I believe it makes the codebase more robust, and I don't see any evidence otherwise.  At this point I've spent more time explaining this patch then writing it.  If you can actually explain why you think a memory leak is worse than a crashing application I'd love to hear it and maybe I'd be willing to spend more of my time implenting a fix.  But as I see it I've done more than enough as a casual user to make this project better.

We all like our PRs to merged without much hassle (since this seems to be your first one, I stay calm and friendly). However this simple script crashes already after 10 iterations on your "fixing" branch:
import threading
import jpype

jpype.startJVM(jpype.get_default_jvm_path())

def threaded_access():
    jpype.java.lang.String("foo")

for i in range(1000):
    threading.Thread(target=threaded_access).start()
    print(i)

So leaking resources is not really an option. Sorry. The original author of the software intended to handle multiple threads by the provided Python api, because every other case would involve "tracking" the life time of the Python threads in order to be able to detach them from the JNI properly (https://jpype.readthedocs.io/en/latest/userguide.html#threading). Maybe one can handle this tracking on Pythons side as well (eg. by using the threading context manager or more cleverly, have a hook function which calls attach and tracks the lifetime. There is a function in the threading module to achieve that https://docs.python.org/2/library/threading.html#threading.setprofile)
Any ways thank you very much for your precious time and this discussion. I think it was valuable (the threading hook idea seems promising).

For the record, your test included above fails on 8d479b9 (tag: v0.6.2) and 07845b0 (master when I started this PR), and much of the time it fails AT the bug that this resolves.  If anything, you've proved this PR is necessary (but not sufficient...).
After applying my patch, it fails elsewhere.  I spent some time trying to resolve the remaining problem(s) your test script finds, but I think there are multiple related concurrent accesses of state within JPMethod and/or JPMethodOverload and I don't have the cycles to reverse engineer the codebase to figure out a reasonable fix.  Plus the lack of synchronization makes me think there may be problems throughout, and time may be better spent on a more thorough redesign for multithreading.


Fix #26 : Function files available in project tree

Changes made

Function.c and Function.h files added to project tree
Added misplaced ADC related function to PSLAB_ADC files

Hello guys! :) Can you take a look at the changes I've made and provide your valuable feedback? Thanks a lot in advance! :+1:


Please move to mavencenter

Need to move this library to maven centre as the jcenter will no longer be available from Feb2022.
https://onesignal.com/blog/android-migrate-jcenter-to-maven-central/

Please move!


Staircase issue.

@qiayuanliao Which parameters need to be modified to enable the robot to adapt to the stairs environment? I created a staircase environment in Gazebo, but the robot failed to pass it successfully.

Hi, @hrxsd! I just uploaded a repository where I modified the trajectories planner to account for the height change of the feet contact as the robot goes up the stairs. Check it out here: https://github.com/danisotelo/qm_door. Hope it can help you! 😄


JSON powered Stackblitz sample broken

I'm submitting a ...  (check one with "x")
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request

Current behavior

The Stackblitz sample https://stackblitz.com/angular/yoeeoymnyxy linked in the "JSON powered" section of the documentation is broken.
Expected behavior

It should show a form, but it only shows a submit button.
Minimal reproduction of the problem with instructions

Open https://formly-js.github.io/ngx-formly/examples/other/json-powered and click the "Edit in StackBlitz"
button on the top right
I've created a fork and fixed the issue on a personal StackBlitz here https://angular-8arnjw.stackblitz.io
What is the motivation / use case for changing the behavior?

Please tell us about your environment:

N/A

Angular version: 2.0.X

All

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

all

Language: [all | TypeScript X.X | ES6/7 | ES5]
all
Node (for AoT issues): node --version =

I'm not sure how the stackblitz samples are built, but you could make a pull request for: https://github.com/formly-js/ngx-formly/blob/master/demo/src/app/examples/other/json-powered/user.service.ts

have you seen my working fork? https://stackblitz.com/edit/angular-8arnjw?file=src%2Fapp%2Fuser.service.ts
it loads a json file from the assets folder and StackBlitz seems to serve it without problems:
https://angular-8arnjw.stackblitz.io/assets/json-powered/user-form.json
https://angular-8arnjw.stackblitz.io/assets/json-powered/user.json
An issue with the original version linked on the documentation is that the json files are in the src/app folder while angular.json declares
            "assets": [
              "src/favicon.ico",
              "src/assets"
            ],

I'm trying to do something similar: use http with angular to access a local json file. I'm getting back index.html when the request is made to my json file. How do I get around this?
It works locally.

@johnpapa normally requesting a file in assets should work, the following example https://stackblitz.com/angular/jnndkxxmjvy work as expected


Issue when using full stop in translate service value

I'm submitting a...

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

Current behavior
this.translocoService.translate('An email was sent to your email address. Please check your mail box.')
Extracted value in json file:
"'An email was sent to your email address": {
" Please check your mail box": {
"'": ""
}
}

When ever I try to translate a string with full stop in it, the service thinks it is an object.
Expected behavior
Extracted value in json value should be :
"'An email was sent to your email address. Please check your mail box.": ""

The service should parse it as a full sentence instead of an object.
Environment

Angular version: 9.1.11

Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: 14.3.0
- Platform:  Mac

Others:

Hi @zzakir I am not sure what do you mean here, could you please create a stackblitz example and show us your use case?

@zzakir I am sorry but what you wish is not possible, please find another solution.

@itayod So do you mean that we cannot translate a sentence using this library if it has a full stop in it?

@zzakir, of course, you can...
you can translate a sentence like that:
{
  "someKey": "my long sentence. with points."
}

and then you can translate like this:
  this.translocoService.translate('someKey'). // will be: "my long sentence. with points."

Ah alright. Now I get it. Thank you very much for your help.


Esp32 s3 xtal cal retry

Adding support for the RTC_XTAL_CAL_RETRY config setting to the ESP32S3.
This config setting is already supported on other chip variants. We have run into an issue recently with some production hardware where an additional retry was needed for the external crystal to be detected during a cold boot. Copying this behaviour from other chip variants has resolved the issue for us.
This change is such that it will not impact existing behaviour for users of the S3 variant, unless they specifically enable the config value

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


Add variables with scope

At the moment it's only supported to read ci/cd-variables with scope, now they can be created, updated and deleted ...

@Toa741 Thanks again for the fabulous colaboration!


Put more data to state -- bring reviews to state & productDetail component

Your PR Notes Here
1.added code to bring reviews data to state/store
2.created productDetail component to show more pics, description, and reviews of one single product

yeah, please take a look again.


shadps4: 0.4.0 -> 0.4.0-unstable-2024-12-08

The meta.updateScript for shadps4 still uses the unstableGitUpdater, but the rev uses a tag reference, so automatic updates will never succeed. In case we still want to stick with the unstableGitUpdater, I've removed anything that expects version to be a nice tag reference and did a bump.

bloodborne.patch doesn't apply anymore, it seems like the whole thread management got rewritten: https://github.com/shadps4-emu/shadPS4/commit/c4506da0ae0fbd218e5ec3d2dc0d94a2ea788ec2
Haven't checked if this patch is still necessary, or if the rewrite fixed whatever necessitated it. Just assumed the latter for now
Update checking is now opt-out, so dropped that patch & just using the appropriate option
av_err2str issue got fixed, dropped av_err2str_macro.patch
Rebased laptop-controls.patch
Added new dependencies
Dropped toml11, it was never getting used because it's too old
Adjusted to desktop files getting moved & renamed
Switched to GCC 14, because the codebase needs std::sinf & co which were bugged in previous versions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700
Added a VM test that installs & runs an example package from the OpenOrbis PS4 development toolchain

OpenOrbis' graphical example works:

Though the Hello World one causes the output to flicker garbage, likely because the example doesn't do any real drawing:

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

I've added a VM test that installs & runs an example from the OpenOrbis toolchain. That seems like a legally non-problematic way of verifying some basic functionality.

@ofborg build shadps4 shadps4.passthru.tests

Feel free to ping me in a couple days if there are no other reviews


Deprecate datasets cnb_classification and isic_classification

Relates to #327
FYI @jacobvjk, I plan to deprecate these datasets properly, which means including a release where we just warn that they will be deprecated.

@jdhoffa do we have a rough timeframe (on a calendar) when we expect to fully deprecate?

Nope, but I think if we do my quarterly release schedule, then next release is end of Q1 (end of March). That will mark beginning of deprecation.
Following release is end of Q2 (so end of June?)
I guess end of June would be when they are hard deprecated? I will update the warning message and add an ADO ticket

Maybe have something along the lines of
"foo will be available until 2024-06-01. In releases of r2dii.data after that date, it will be unavailable. Please use bar instead. See  this blog post for more information."
So users know have some idea of when they would need to transition by?

Deprecation warning is already there. Following the lifecycle style deprecation process:
https://github.com/RMI-PACTA/r2dii.data/pull/331/files
I just need to update the "date"

@AlexAxthelm do you think "expected in 2024Q2 release" would be too vague actually? I would tend to prefer that...

ADO ticket in proposal of next quarter's KRs involving completing the deprecation process:
https://dev.azure.com/RMI-PACTA/2DegreesInvesting/_workitems/edit/9711

"expected in 2024Q2 release" would be too vague actually?

I think I shouldn't write user-facing messages. But that's reasonable enough from my side.
cc @hodie

As per a discussion with @jacobvjk, we are going to add the ISIC classification bridge revision 5. So rather than a "deprecation" the dataset will just be updated.
cnb_classification will still be deprecated


web-client can start with node app.js

throw new TypeError('The super constructor to `inherits` must not ' +
         ^
TypeError: The super constructor to `inherits` must not be null or undefined.
   at Object.exports.inherits (util.js:728:11)
   at Object.<anonymous> (./node_modules/http-proxy/lib/http-proxy/index.js:111:17)

This problem was caused by the http-proxy, it need the version > 1.11.x
so change it to 1.13.2 will fix this.

@hygkui Thanks for the PR


migrate to beancount-parser version 2

I finally changed my mind and re-published beancount_parser_2 under the name of beancount-parser (version 2.0.0-beta.1) and I deprecated the old beancount_parser_2 name.
You can stick with beancount-parser (version 2) now.
Sorry for the confusion.

Thank you for the PR!


Issues compiling with exceptions disabled

I've noticed the following two things when compiling with -fno-exceptions:

An unused parameter warning on line 202 in expected.hpp (using b74fecd for reference, but it's the same with v1.0.0)
The second one is a "use of a deleted function" error (I added a test in my PR that should demonstrate it)

Hopefully that makes sense. Thanks for the great library!

Everything works as expected when compiling with -fno-exceptions


[#33] [Backend] As a user, I can submit answers for the survey

Close #33

What happened 👀

Implement backend components for submitting survey responses API /v1/responses.
Add sample request in SurveyViewModel.

Insight 📝
Fake model for sample API request
            val surveySubmission = SurveySubmission(
                id = survey.id,
                questions = listOf(
                    QuestionSubmission(
                        id = survey.questions[1].id,
                        answers = listOf(
                            AnswerSubmission(
                                id = survey.questions[1].answers?.get(0)?.id.orEmpty(),
                                answer = "answer"
                            )
                        )
                    )
                )
            )

Proof Of Work 📹
2023-01-05 14:34:20.555 23027-23027/vn.luongvo.kmm.survey.android.staging D/HttpClientCallLogger$closeRequestLog: REQUEST: https://survey-api.nimblehq.co/api/v1/responses
    METHOD: HttpMethod(value=POST)
    COMMON HEADERS
    -> Accept: application/json
    -> Accept-Charset: UTF-8
    -> Authorization: Bearer 5nAy-saabomEZM3_BNirm1rUpI88WN9-iudyGABxaoU
    CONTENT HEADERS
    -> Content-Length: 295
    -> Content-Type: application/json
    BODY Content-Type: application/json
    BODY START
    {
        "survey_id": "d5de6a8f8f5f1cfe51bc",
        "questions": [
            {
                "id": "940d229e4cd87cd1e202",
                "answers": [
                    {
                        "id": "4cbc3e5a1c87d99bc7ee",
                        "answer": "answer"
                    }
                ]
            }
        ]
    }
    BODY END
2023-01-05 14:34:20.936 23027-23075/vn.luongvo.kmm.survey.android.staging D/HttpClientCallLogger$closeResponseLog: RESPONSE: 201 Created
    METHOD: HttpMethod(value=POST)
    FROM: https://survey-api.nimblehq.co/api/v1/responses
    COMMON HEADERS
    -> alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
    -> cache-control: max-age=0, private, must-revalidate
    -> cf-cache-status: DYNAMIC
    -> cf-ray: 784a87e9fcf10796-HKG
    -> connection: keep-alive
    -> content-type: application/json; charset=utf-8
    -> date: Thu, 05 Jan 2023 07:34:20 GMT
    -> etag: W/"3e257828e76751314bd867ec78ba5616"
    -> nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
    -> referrer-policy: strict-origin-when-cross-origin
    -> report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=sZ5kmfCGESuVQecPrXaoLGzvrFqu6t95OBAoMGoFFJ09P4DPX%2BJqXwUOY4kb8IQqVX%2BpcPXQujGo%2FSfFjQr602ws%2Fvs7ef6mU735NfDR5rh3C53Cl0J%2FRpKGXNUNw9Pt2yTgzNfT3oXN"}],"group":"cf-nel","max_age":604800}
    -> server: cloudflare
    -> strict-transport-security: max-age=31536000; includeSubDomains
    -> transfer-encoding: chunked
    -> vary: Accept-Encoding, Origin
    -> via: 1.1 vegur
    -> x-android-received-millis:<PHONE_NUMBER>928
    -> x-android-response-source: NETWORK 201
    -> x-android-selected-protocol: http/1.1
    -> x-android-sent-millis:<PHONE_NUMBER>557
    -> x-content-type-options: nosniff
    -> x-download-options: noopen
    -> x-frame-options: SAMEORIGIN
    -> x-permitted-cross-domain-policies: none
    -> x-request-id: 0414fd3b-da1f-4247-9f36-092787f90dc0
    -> x-runtime: 0.004351
    -> x-xss-protection: 1; mode=block
    BODY Content-Type: application/json; charset=utf-8
    BODY START
    {}
    BODY END

Codecov Report

Merging #73 (66a3b92) into feature/19-home-logout-integration (af52c32) will increase coverage by 0.22%.
The diff coverage is 63.07%.

@@                          Coverage Diff                           @@
##           feature/19-home-logout-integration      #73      +/-   ##
======================================================================
+ Coverage                               63.79%   64.02%   +0.22%
======================================================================
  Files                                      67       70       +3
  Lines                                    1254     1312      +58
  Branches                                  219      221       +2
======================================================================
+ Hits                                      800      840      +40
- Misses                                    372      389      +17
- Partials                                   82       83       +1

Flag
Coverage Δ

unittests
64.02% <63.07%> (+0.22%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

.../android/ui/screens/survey/views/SurveyQuestion.kt
86.00% <ø> (+1.68%)
:arrow_up:

...y/data/remote/datasource/SurveyRemoteDataSource.kt
0.00% <0.00%> (ø)

...emote/model/request/SurveySubmissionRequestBody.kt
23.80% <23.80%> (ø)

...m/survey/android/ui/screens/survey/SurveyScreen.kt
70.31% <75.00%> (+5.23%)
:arrow_up:

...urvey/android/ui/screens/survey/SurveyViewModel.kt
88.46% <82.35%> (-11.54%)
:arrow_down:

...urvey/android/ui/screens/survey/QuestionUiModel.kt
80.00% <83.33%> (+13.33%)
:arrow_up:

...kmm/survey/data/repository/SurveyRepositoryImpl.kt
100.00% <100.00%> (ø)

...uongvo/kmm/survey/domain/model/SurveySubmission.kt
100.00% <100.00%> (ø)

...o/kmm/survey/domain/usecase/SubmitSurveyUseCase.kt
100.00% <100.00%> (ø)

... and 1 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


build(ci): disable the alert for now #trivial

This PR resolves []
Description

Disable spammy alert while I look into fixing!
PR Checklist

[ ] I have tested my changes on iOS and Android.
[x] I hid my changes behind a feature flag, or they don't need one.
[x] I have included screenshots or videos, or I have not changed the UI.
[x] I have added tests, or my changes don't require any.
[x] I added an app state migration, or my changes do not require one.
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

[ ] I would like at least one of the reviewers to run this PR on the simulator or device.

Changelog updates
Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

stop spammy alert for now - Brian

Need help with something? Have a look at our docs, or get in touch with us.

This PR contains the following changes:

Dev changes (stop spammy alert for now - Brian)

  Generated by :no_entry_sign: dangerJS against e4757dfc321a11f9b0e9fc160dd9ee95ff59a1b1

thanks a lot


Add the control property thanks to component as props

Adding a control property with the new component property for the Menu allowing to get a menu with different target than the default '...'

For discussion: I tried without the wrapping div but then the click event would not get passed on to the Dash provided control element.

Thanks a lot @RenaudLN but I have added this in dmc (which is in typescript and is based on Mantine 5).


replace did:ethr by did:tez

in the module *
https://github.com/TalaoDAO/qrcode-generator/blob/main/helpers/didkit-handler.js
replace "ethr" by "tz"
didkit will generate a DID in the tezos style "did:tz:tz2......"

to go faster and simple, you can only hard code the issuer DID as
?issuer=did:tz:tz1NyjrTUNxDpPaqNZ84ipGELAcTWYg6s5Du


Update Composer dependencies (2024-09-24-00-19)

Visual regression test passed!
View the visual regression test report


Update the constant symbol type when visiting the expression itself

Description:
Currently, constant symbol type is updated by the updateSymbolType method in ConstantValueResolver. We can probably do this in better way when visiting the expression itself (when creating the BLangConstantValue).
Related discussion.

Related to #36538


Add preliminary ARMv8-A support

32-bit only for now
Tested with a Raspberry Pi 4 (target included)
All basic debugger operations work
This includes minor refactoring to share code between v7-a and v8-a
Both Cortex-A targets have updated register cache logic to fix some bugs
found while testing

Signed-off-by: Ryan Fairfax<EMAIL_ADDRESS>

Reviewers notes:

This gets 32-bit support fully up and running for armv8-a cores.  My test bed was the Raspberry Pi 4 with a 32-bit OS image
While a lot of the logic with the v7-a is similar the debugger register model is just different enough to reduce the amount of code that can be shared.  I did refactor the instruction generation into a common path.
Some operations fail if you connect and the CPU is in 64-bit mode.
I found some bugs with the register cache getting cleared each time a core is acquired since the object is short lived so I updated the v8-a and v7-a items to use a new Cortex-A specific state.  This fixed the issue nicely and enabled me to do a more or less full debugging session with gdb without any major issues.

Up next is changes for 64-bit support - I'll start a discussion with an overview of the common changes I think are needed and then implement them for the v8-a core.

Thanks for the review.

The arch files are getting bigger and bigger. Maybe it would be worth splitting register definitions into separate files. Not sure.

Yes, I ended up writing a few thousand lines of code without realizing it due to all the debug registers needed.  I've moved both the v7 and v8 regs into their own module which definitely makes it easier to read and navigate the files.


$ python recognize-from-microphone.py -s 5

Does this app need any permission to access the micro? It does not pick up any sounds, shows samples at 0 while reading.

Perhaps you have the microphone sound set to zero in your system settings. Look.


[Don't merge] Commit suggestion sample (config file loading)

Check to see if the config file is loaded

no need


notebook

Issue Type: Feature Request
I hope most of the feature of vscode editor, appear in notebook cells this will be an amazing thing and more productive
Extension version: 2020.8.109390
VS Code version: Code 1.49.1 (58bb7b2331731bf72587010e943852e13e6fd3cf, 2020-09-16T23:23:33.049Z)
OS version: Linux x64 5.4.0-47-generic

Thank you for your feedback @AbdelrahmanHamdy1996. They will soon, you can even try a preview of it right now:
https://devblogs.microsoft.com/python/notebooks-are-getting-revamped/


Crashing on Android

Summary

Version
0.21.5

Affected OS
Android

OS Version
?

Current behavior

The app is crashing after linking the library.  Here are some screenshots of my code
settings.gradle

android/build.gradle

android/app/build.gradle

Expected behavior
To work without any errors.

Please provide the actual crash/error message

1
App Crashes on launch with no crash/error message

@machour Yeah App Crashes with no crash / error, doesnt have any error shown on react-native log-android

Could you set up a public repo reproducing the error?

i'll try to make a new public repo with my current libraries, i'll send it later man

@machour try this one https://github.com/sircEUNHO/ForTesting

I added this library and got this error on launching the app. It works fine if i remove the react-native-fcm library, but whenever  i add both the app crashes. Here is the log of crash  :-
06-04 12:26:06.949 5578-5578/com.yudhaapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.yudhaapp, PID: 5578
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5153)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbq" on path: DexPathList[[zip file "/data/app/com.yudhaapp-1/base.apk"],nativeLibraryDirectories=[/data/app/com.yudhaapp-1/lib/x86, /data/app/com.yudhaapp-1/base.apk!/lib/x86, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:5153)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.common.internal.zzbq
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 13 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

@sircEUNHO  Could be. Firebase and this library are not getting along.

I tried to remove my react-native-firebase but still the app is crashing without any errors showing, may i aks how you come up with the stack trace @bastolaxantos ?

@sircEUNHO I opened the project on Android Studio and run from it.

Adding the following line to the android build.gradle file
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.google.android.gms') {
details.useVersion '12.0.1'
}
if (requested.group == 'com.google.firebase') {
details.useVersion '12.0.1'
}
}
}
and making the following change in the build.gradle file for react-native-device-info
dependencies {
compile 'com.facebook.react:react-native:+'
compile 'com.google.android.gms:play-services-gcm:12.0.1'
}
solved it for us.

Adding the following line to the android build.gradle file
configurations.all {             resolutionStrategy.eachDependency { DependencyResolveDetails details ->                 def requested = details.requested                 if (requested.group == 'com.google.android.gms') {                     details.useVersion '12.0.1'                 }                 if (requested.group == 'com.google.firebase') {                     details.useVersion '12.0.1'                 }             }         }
and making the following change in the build.gradle file for react-native-device-info
dependencies {     compile 'com.facebook.react:react-native:+'     compile 'com.google.android.gms:play-services-gcm:12.0.1' }
solved it for us.

@diteshcrypto thanks i'll put the first line of codes on android/build.gradle right? while the second one is in android/app/build.gradle?

@diteshcrypto this doesn't work on my case. I'ts still crashing.

@sircEUNHO If you still facing crash problem then follow these steps. It worked in my case:

Open the project on Android Studio

On app level build.gradle file use same version on all firebase and gms dependencies.
dependencies {
compile project(':react-native-device-info')
compile project(':react-native-fcm')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+"
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
}

Open build.gradle file of react-native-device-info module

Put the same version of dependency on play-services-gcm
dependencies {
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ?
project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION
compile 'com.facebook.react:react-native:+'
compile "com.google.android.gms:play-services-gcm:10.0.1"
}

Open build.gradle of firebase module you installed. In my case it is react-native-fcm

Repeat the same process (use same version for all firebase dependencies)
dependencies {
def googlePlayServicesVersion = project.hasProperty('googlePlayServicesVersion') ? project.googlePlayServicesVersion : DEFAULT_GOOGLE_PLAY_SERVICES_VERSION
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facebook.react:react-native:+'
compile "com.google.firebase:firebase-core:10.0.1"
compile "com.google.firebase:firebase-messaging:10.0.1"
compile 'me.leolin:ShortcutBadger:1.1.17@aar'
}

Sync the gradle file and build the project

@bastolaxantos getting the stack trace on android studios and finding solutions for it fixed this for me. It had a conflict with my react-native-background-geolocation but its fixed now thanks for all the answes.

@sircEUNHO What was the solution ? Can you post it here ? I am also stuck in the same situation and can get help.

I had this issue and was able to fix by changing:
def DEFAULT_GOOGLE_PLAY_SERVICES_VERSION = "+"
to
`def DEFAULT_GOOGLE_PLAY_SERVICES_VERSION = ""
in node_modules/react-native-device-info/android/build.gradle
to the version my app was currently using.
I was able to find the version my app was using in my app-level build.gradle.
`compile 'com.google.android.gms:play-services-gcm:<THE VERSION YOU'RE USING>'

@j-ornelas - that is a brittle way to change it, and no module should merge a change like that. If you look at the line referencing the google play version:
https://github.com/react-native-community/react-native-device-info/blob/master/android/build.gradle#L28
You'll see it is checking first: project.hasProperty('googlePlayServicesVersion') ? and using the project version if it exists.
So the correct fix is to take your app and put a real version in - like the example: https://github.com/react-native-community/react-native-device-info/blob/master/example/android/build.gradle#L4
You will be much happier with that (and with pinning all your versions in your application) in the long-run. This style is relatively new (maybe a year? maybe less?) but almost everyone has adopted it because it makes so much sense for future-proofing against these version mismatches
Hope this helps

I was also having the same issue and i simply commented these 3 lines in node_modules/react-native-device-info/android/build.gradle.. It works for me!!!
if(firebaseIidVersion){
// implementation "com.google.firebase:firebase-iid:$firebaseIidVersion"
}else{
// def iidVersion = safeExtGet('googlePlayServicesIidVersion', safeExtGet('googlePlayServicesVersion', '17.0.0'))
// implementation "com.google.android.gms:play-services-iid:$iidVersion"
}

@babarbahadur alternatively, did you attempt to define a googlePlayServicesVersion or googlePlayServicesIidVersion that was compatible with your build? Sounds like you have either old versions or incompatible versions. Google is moving lots of it's play services stuff to firebase, so the statement "I wasn't using firebase" may not mean much now or in the future as it might need this on the end ", but I was using functionality they implement in some of the firebase libraries"

@mikehardy yeah i tried all of the above solution but non of them worked. I tried 'force' as well and also defined my googlePlayServicesVersion but it wasn't working. My current googlePlayServicesVersion is 17.0.0, react-native: 0.61.5


Request to View Media Image in Full Screen without Downloading !

I would like to request a feature that allows users to view media images in full-screen mode without needing to download them first. This feature would enhance the user experience by providing a seamless way to preview images in their full resolution directly within the application.
Proposed Solution:
Add a "View in Full Screen" option to the context menu when users click on an image.
When the option is selected, the image should open in an overlay or modal in full-screen mode.
Provide an option to close the full-screen view and return to the previous screen.
Ensure that the full-screen view works on both desktop and mobile devices, with appropriate gestures like pinch to zoom.
Benefits:
Improves user experience by allowing users to view images in greater detail.
Reduces unnecessary downloads, saving bandwidth and storage.
Provides a more modern and engaging media viewing experience.
Additional Context:
Please consider accessibility guidelines for the implementation to ensure it works well for all users, including those using assistive technologies.

Hi @Nulinz,
Thank you for the great suggestion! However, we won’t be able to provide this feature in the near future. Offering a new view would require extensive customization.
That said, your request is both valid and common, so here’s a possible solution: we can provide a callback for the image click. Using this callback, users can open a new screen or dialog with the customizations they require.

Waiting for image click callback
Even onChatListTap if return id or Message click can be helpful
This way we can check if this is image then open it in full screendialog and more can be done like play video with some tricks

Hello after a long search i found that we get image easily
imageMessageConfig: ImageMessageConfiguration(
onTap: (p0) {
print('Image Tapped :  $p0');
},
                it's better if we get complete message instance