about npm install it on china :http erro

SerialPort Version:^4.0.7

NodeJS Version:8.2.1

Operating System and Hardware Platform:window 10

Have you checked the right version of the api docs?:yes

Are you having trouble installing and you checked the Installation Special Cases docs?yes

Are you using Electron and have you checked the Electron Docs?:yes

Summary of Problem
It can't  install by node-pre-gyp install :download file from S3.
i do it on china ^.^
Steps and Code to Reproduce the Issue

I am in China. everything is OK without VPN
look at: http://www.jianshu.com/p/696fbdeb5b8a
rebuild model in electron env, use like this node-pre-gyp rebuild --target=1.6.2 --arch=x64 --target_arch=x64 --dist-url=https://atom.io/download/electron

@hanfengcan thank you

@reconbot thanks~I got it~but have new issues from use. new issues:
https://github.com/EmergingTechnologyAdvisors/node-serialport/issues/1272


Using custom payload resulting in error

Description

Using custom payload resulting in failure. Earlier assumption was some issue with custom payload image. However even using the default kata-operator-payload image via the configmap is failing as well
Steps to reproduce the issue:

Deploy Kata-operator
Create payload-config configmap

kind: ConfigMap
apiVersion: v1
metadata:
  name: payload-config
  namespace: kata-operator-system
data:
  # change to your custom payload repository:tag value
  daemon.payload: quay.io/isolatedcontainers/kata-operator-payload:4.7.0

Deploy kata

 oc create -f config/samples/kataconfiguration_v1_kataconfig.yaml

Describe the results you received:
Status:
  Installation Status:
    Completed:
    Failed:
      Failed Nodes Count:  2
      Failed Nodes List:
        Error:  image layout must contain index.json file
        Name:   worker1.ocp4.example.com
        Error:  image layout must contain index.json file
        Name:   worker0.ocp4.example.com

POD log
I1222 14:20:45.356871  100697 request.go:645] Throttling request took 1.02506771s, request: GET:https://<IP_ADDRESS>:443/apis/scheduling.k8s.io/v1beta1?timeout=32s
W1222 14:20:46.813982  100697 client_config.go:608] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
2020/12/22 14:20:46 Kata operator payload tag: 4.7.0
W1222 14:20:46.819014  100697 client_config.go:608] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/usr/bin/mkdir -p /host/opt/kata-install
2020/12/22 14:20:46 WARNING: kataconfig installation is tainted
2020/12/22 14:20:46 Using env variable KATA_PAYLOAD_IMAGE quay.io/isolatedcontainers/kata-operator-payload:4.7.0
error creating Runtime bundle layout in /usr/local/kata

Describe the results you expected:
Successful Kata setup with custom payload
Additional information you deem important (e.g. issue happens only occasionally):
Output of oc describe kataconfig <your-kataconfig>:
Name:         example-kataconfig
Namespace:
Labels:       <none>
Annotations:  <none>
API Version:  kataconfiguration.openshift.io/v1
Kind:         KataConfig
Metadata:
  Creation Timestamp:  2020-12-22T14:19:56Z
  Finalizers:
    finalizer.kataconfiguration.openshift.io
  Generation:        2
  Resource Version:  2790479
  Self Link:         /apis/kataconfiguration.openshift.io/v1/kataconfigs/example-kataconfig
  UID:               680b7e1b-d021-46a0-8c2d-172799332823
Spec:
  Config:
    Source Image:
  Kata Config Pool Selector:
    Match Labels:
      node-role.kubernetes.io/worker:
Status:
  Installation Status:
    Completed:
    Failed:
      Failed Nodes Count:  2
      Failed Nodes List:
        Error:  image layout must contain index.json file
        Name:   worker1.ocp4.example.com
        Error:  image layout must contain index.json file
        Name:   worker0.ocp4.example.com
    In Progress:
  Kata Image:
  Runtime Class:
  Total Nodes Count:  2
  Un Installation Status:
    Completed:
    Failed:
    In Progress:
  Upgrade Status:

Additional environment details (platform, options, etc.):
ocp version
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2020-12-14-165231   True        False         6d      Cluster version is 4.7.0-0.nightly-2020-12-14-165231

This was resolved with an updated payload image. Thans @bpradipt !


Tensorflow 2.1 "MemoryError" during Ktrain installation on Ubuntu instance of AWS EC2

Hello,
I was trying to deploy a model trained using Ktrain on AWS EC2 instance having Ubuntu 16.04.6 (Xenial Xerus) version. Following your advice from an earlier issue, I updated to pip3. Python3 is also installed.
Although, the independent installation of  pip3 install tensorflow is working fine, the installation of Ktrain using pip3 install ktrain is giving MemoryError when Ktrain starts installing the dependency of tensorflow (2.1.0)

MemoryError at the end:

I would be grateful if you could inspect and kindly advise. Thanks.

This is more of a pip issue rather than a ktrain issue.  If you google it, there are solutions here, here, and here, which all point to the same solution:
pip install --no-cache-dir packagename


Error with check command

I'd thought to give this plugin a try with a suspected IP. So I performed avpn check and then the IP number.
Then it give me an error. Maybe I'm doing something wrong, idk. Just new to this plugin, so it might as well be my mistake. Then please forgive me.
14:37:58 [INFO] CONSOLE executed command: /avpn check <IP_ADDRESS>
14:37:58 [INFO] §f§e[§bAnti-VPN§e] §r§eChecking §f<IP_ADDRESS>§e..
14:37:59 [INFO] §cI'm sorry, but there was an error performing this command.
14:37:59 [SEVERE] [AntiVPN] [ACF] Exception in command: antivpn check <IP_ADDRESS>
14:37:59 [SEVERE] [AntiVPN] [ACF] java.lang.reflect.InvocationTargetException
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at java.lang.reflect.Method.invoke(Method.java:498)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.external.co.aikar.commands.RegisteredCommand.invoke(RegisteredCommand.java:147)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.external.co.aikar.commands.BaseCommand.executeCommand(BaseCommand.java:650)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.external.co.aikar.commands.BaseCommand.execute(BaseCommand.java:493)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.external.co.aikar.commands.RootCommand.execute(RootCommand.java:67)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.external.co.aikar.commands.BungeeRootCommand.execute(BungeeRootCommand.java:81)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at net.md_5.bungee.api.plugin.PluginManager.dispatchCommand(PluginManager.java:168)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at net.md_5.bungee.api.plugin.PluginManager.dispatchCommand(PluginManager.java:115)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at net.md_5.bungee.BungeeCordLauncher.main(BungeeCordLauncher.java:63)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at net.md_5.bungee.Bootstrap.main(Bootstrap.java:15)
14:37:59 [SEVERE] [AntiVPN] [ACF] Caused by: java.lang.NullPointerException
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.apis.IPDetectorAPI.getResult(IPDetectorAPI.java:46)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.services.InternalAPI.resultExpensive(InternalAPI.java:219)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.services.InternalAPI.lambda$cascade$2(InternalAPI.java:96)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.external.com.github.benmanes.caffeine.cache.BoundedLocalCache.lambda$doComputeIfAbsent$14(BoundedLocalCache.java:2039)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1853)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.external.com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2037)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.external.com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2020)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.external.com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:112)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.external.com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:54)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.services.InternalAPI.cascade(InternalAPI.java:96)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.VPNAPI.cascade(VPNAPI.java:155)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.VPNAPI.cascade(VPNAPI.java:133)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.commands.internal.CheckCommand.run(CheckCommand.java:43)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	at me.egg82.antivpn.commands.AntiVPNCommand.onCheck(AntiVPNCommand.java:52)
14:37:59 [SEVERE] [AntiVPN] [ACF] 	... 13 more

So I tried the avpn test command on that IP. After 10 min of waiting, I gave up and had to kill bungeecord.
Using a simple BungeeCord test server

Issue was an NPE at int goodIp = ((Number) json.get("goodIp")).intValue();
Fix was to add a null check to the line above, and return an Optional.empty()


timeout parameter needs to be added for requests.get and requests.post

absence of timeout value for requests.get() and requests.post() calls would result in being blocked indefinitely.

yeah, timeout should probably be added. Let me take a look into that.

#286


[ZEPPELIN-3596] Saving resources from pool to SQL

What is this PR for?

It's information in resourcePool, but it is only available for viewing. It would be nice if we can save this data to SQL via JDBC Driver.

Now you can access to ResourcePool data from SQL query. For example, if you write SELECT * FROM {ResourcePool.note_id=SOME_NOTE_ID.paragraph_id=SOME_PARAGRAPH_ID}; and it will be correct SQL query.
How it works:

Creates and fills a table named like a PARAGRAPH_ID;
Expression {*} replaces with actual table name;
Updated SQL query is running.

Also, you can not specify the note_id, then the note_id of the current notebook will be used. For example, SELECT * FROM {ResourcePool.paragraph_id=SOME_PARAGRAPH_ID};.
What type of PR is it?
Improvement
What is the Jira issue?
Zeppelin 3596
Questions:

Does the licenses files need update? No
Is there breaking changes for older versions? No
Does this needs documentation? No

Thanks @oxygen311 for the contribution, but I think it is already done in ZEPPELIN-3377 via ZeppelinContext variable interpolation

@zjffdu variable interpolation is about just using text variable. But with this feature you can transform %table text from ResourcePool to SQL table.

@oxygen311 I am not sure how much useful and important this senior is for users. It looks like a little weird to me that you have to insert the paragraph result into database and then execute the query.
Can you share more details about your scenario ?
BTW, I raise one thread in mail list to discuss about sharing data in zeppelin, welcome any comments on that.
<EMAIL_ADDRESS>

ping @oxygen311

@zjffdu
The user can transfer data not only from one database to another, but from flat files and interpreters, which are not available in the python (e.g. SAP).
Sending data through ResourcePool is not as effective as native methods, but can cover up to 80% of user needs.

@oxygen311 Could you tell more details about your scenario ? What is the interpreter of your source data (ResourcePool.note_id=SOME_NOTE_ID.paragraph_id=SOME_PARAGRAPH_ID)

Scenario: get a list of client IDs from one source (flat file, base, SAP), send the list to the database and perform complex analytics with it.
The data in the database is large and there is no way to pull everything into Python to run the analytics inside the Python.


Support indexing maps with any valid key type

According to the spec, maps should support int, uint, and bool keys in addition to strings. The parser already supports this but accessing maps using non-string keys is unimplemented in the interpreter, so I added match cases to support this.
The spec makes it pretty clear that map indexes of ints, uints, and floats are done using the cel's numeric equality (see https://github.com/google/cel-spec/blob/master/doc/langdef.md#equality and https://github.com/google/cel-spec/blob/master/doc/langdef.md#numbers). For statically typed maps this would be rejected by the checker even though its allowed by the runtime, but from what I can tell cel-rust doesn't have a separate check step, so I implemented these to work how spec describes the runtime.

@fore5fire approved but looks like there are conflicts that need to be resolved.

@fore5fire approved but looks like there are conflicts that need to be resolved.

Should be fixed now


💡[FEATURE]: Loan Default Prediction

Is your feature request related to a problem? Please describe.
Description: Create a predictive model to identify borrowers who are likely to default on their loans.
Describe the solution you'd like
Key Techniques: LSTM for time series analysis of borrower repayment history, feature selection from credit history, and DNN for prediction.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

pls assign it me

make a web app for it


Use peer widget for minimap

Using a peer widget matches the tags and you can just reduce the font size :D.

@Moosems a really good suggestion! that also speeds up the editor a lot!
also tried it out
import tkinter as tk

class TextPeer(tk.Text):
    "boakly's implementation: https://stackoverflow.com/a/58290100/14507110"
    count = 0
    def __init__(self, master, cnf={}, **kw):
        TextPeer.count += 1
        parent = master.master
        peerName = "peer-{}".format(TextPeer.count)
        if str(parent) == ".":
            peerPath = ".{}".format(peerName)
        else:
            peerPath = "{}.{}".format(parent, peerName)

        master.tk.call(master, 'peer', 'create', peerPath, *self._options(cnf, kw))
        tk.BaseWidget._setup(self, parent, {'name': peerName})

root = tk.Tk()

text_widget1 = tk.Text(root, font="Consolas 13")
text_widget1.tag_config("red", foreground="red")
text_widget1.insert("1.0", "This is the first text widget.", "red")
text_widget1.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)

text_widget2 = TextPeer(text_widget1, font="Ariel 5", width=30)
text_widget2.pack(side=tk.LEFT, fill=tk.Y)

root.mainloop()

it works amazing, and the tags is ofc a plus, current minimap don't have tags added (it was already too much updation going on every change made in editor).

@Moosems I had an attempt to optimize the minimap further by using lines instead of text (so to render the details less)
self.text = self.tw.get_all_text()
y = 0
offset = 5
for line in self.text.split("\n"):
    if ln := len(line):
        self.cw.create_line(offset, y, ln, y, fill="grey", width=2, tag="redrawn")
    y += 3

with splitting for spaces
self.text = self.tw.get_all_text()
y = 0
offset = 5
for line in self.text.split("\n"):
    if line.strip():
        x = offset
        for block in line.split():
            if ln := len(block.strip()):
                self.cw.create_line(x, y, x+ln, y, fill="grey", width=2, tag="redrawn")
                x += ln
            x += 1
    y += 3

this implementation didn't support indentations at beginning, also no tags. still, this was too much for a single change made in editor too, needed a lot more optimizations.

How fast is the peer widget with timed tests?

Make 1000 lines ;).

I want to see how it handles a large text file.

For each word you could check any colors associated from tags so at least the user can get the colors if not the actual words. I do like the idea of a peer widget a little better because it has all the tags and words but the scaling ratio could be difficult and though I get the want for optimization I do actually appreciate being able to see the words. At the very least having no wrap with side to side scrolling and indentations would be nice and colored words would similarly be nice.

x = offset + (len(line) - len(line.strip()))

if ln := len(block.strip()): -> if ln := len(block):

Whichever way works better :).

execution_time = timeit.timeit(measure_widget_performance, number=1000)
print(f"Average execution time: {execution_time / 10:.6f} seconds")

Average execution time: 0.000550 seconds

Could you paste the current state of the code?

I dont have much to show right now, pretty much what i posted above :)) (last week was busy because of uni oop sorry xd)

Well I don't have the code for the optimized lines.

@Moosems check out this recent commit i just did, now uses a peer text widget instead. except, now the slider is not available for minimap. I couldn't render the slider image on top of peer text widget embedded inside the canvas


Failure running a SavedModel exported from a tf.Module with a Keras model as an instance variable

I have been advised by the Tensorflow team to post this issue here. I will restate issue below.
Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
No, because the sample code produces a core dump.
Source
binary
TensorFlow version
2.17.0
Custom code
No
OS platform and distribution
Linux Ubuntu 22.04.4 LTS
Mobile device
No response
Python version
3.10.12
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
Saving a tf.Module using tf.saved_model.save when that class contains a Keras model in an instance variable results in a FAILED_PRECONDITION when run using saved_model_cli or libtensorflow.
In Tensorflow v2.15.0, the behavior is as expected: the graph execution proceeds without any errors and the expected results are produced.
Standalone code to reproduce the issue
import tensorflow as tf
import numpy as np

SHAPE = (1, 5)

class TestModel(tf.Module):
    def __init__(self):
        super().__init__()
        self.dense_layer = tf.keras.layers.Dense(10)

    @tf.function(input_signature=[tf.TensorSpec(shape=SHAPE, dtype=tf.float32)])
    def run(self, x):
        return self.dense_layer(x)

module = TestModel()
sample_input = tf.random.normal(SHAPE, dtype=tf.float32)
module.run(sample_input)

np.save('sample_input.npy', sample_input.numpy())
tf.saved_model.save(module, "test_model")

# # To reproduce, run the following:
# python test.py && saved_model_cli run --dir test_model --tag_set serve --signature_def serving_default --inputs 'x=sample_input.npy'

Relevant log output
2024-08-01 15:25:35.204057: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-08-01 15:25:35.261217: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-08-01 15:25:35.278801: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-08-01 15:25:35.313892: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-08-01 15:25:37.270110: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2024-08-01 15:25:38.898105: I tensorflow/core/common_runtime/gpu/gpu_device.cc:2021] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 4281 MB memory:  -> device: 0, name: Tesla V100-PCIE-16GB, pci bus id: 0000:3b:00.0, compute capability: 7.0
2024-08-01 15:25:38.898868: I tensorflow/core/common_runtime/gpu/gpu_device.cc:2021] Created device /job:localhost/replica:0/task:0/device:GPU:1 with 944 MB memory:  -> device: 1, name: Tesla V100-PCIE-16GB, pci bus id: 0000:d8:00.0, compute capability: 7.0
WARNING:tensorflow:From /home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/tools/saved_model_cli.py:716: load (from tensorflow.python.saved_model.loader_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.saved_model.load` instead.
W0801 15:25:38.903731<PHONE_NUMBER>41120 deprecation.py:50] From /home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/tools/saved_model_cli.py:716: load (from tensorflow.python.saved_model.loader_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.saved_model.load` instead.
INFO:tensorflow:Restoring parameters from test_model/variables/variables
I0801 15:25:38.936800<PHONE_NUMBER>41120 saver.py:1417] Restoring parameters from test_model/variables/variables
2024-08-01 15:25:38.941206: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:388] MLIR V1 optimization pass is not enabled
2024-08-01 15:25:39.144248: I tensorflow/core/framework/local_rendezvous.cc:404] Local rendezvous is aborting with status: FAILED_PRECONDITION: Could not find variable dense/bias. This could mean that the variable has been deleted. In TF1, it can also mean the variable is uninitialized. Debug info: container=localhost, status error message=Resource localhost/dense/bias/N10tensorflow3VarE does not exist.
	 [[{{function_node __inference_run_106}}{{node dense_1/Add/ReadVariableOp}}]]
2024-08-01 15:25:39.144340: I tensorflow/core/framework/local_rendezvous.cc:404] Local rendezvous is aborting with status: FAILED_PRECONDITION: Could not find variable dense/bias. This could mean that the variable has been deleted. In TF1, it can also mean the variable is uninitialized. Debug info: container=localhost, status error message=Resource localhost/dense/bias/N10tensorflow3VarE does not exist.
	 [[{{function_node __inference_run_106}}{{node dense_1/Add/ReadVariableOp}}]]
	 [[StatefulPartitionedCall/_21]]
2024-08-01 15:25:39.144423: I tensorflow/core/framework/local_rendezvous.cc:423] Local rendezvous recv item cancelled. Key hash:<PHONE_NUMBER>1576968325
Traceback (most recent call last):
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 1401, in _do_call
    return fn(*args)
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 1384, in _run_fn
    return self._call_tf_sessionrun(options, feed_dict, fetch_list,
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 1477, in _call_tf_sessionrun
    return tf_session.TF_SessionRun_wrapper(self._session, options, feed_dict,
tensorflow.python.framework.errors_impl.FailedPreconditionError: 2 root error(s) found.
  (0) FAILED_PRECONDITION: Could not find variable dense/bias. This could mean that the variable has been deleted. In TF1, it can also mean the variable is uninitialized. Debug info: container=localhost, status error message=Resource localhost/dense/bias/N10tensorflow3VarE does not exist.
	 [[{{function_node __inference_run_106}}{{node dense_1/Add/ReadVariableOp}}]]
	 [[StatefulPartitionedCall/_21]]
  (1) FAILED_PRECONDITION: Could not find variable dense/bias. This could mean that the variable has been deleted. In TF1, it can also mean the variable is uninitialized. Debug info: container=localhost, status error message=Resource localhost/dense/bias/N10tensorflow3VarE does not exist.
	 [[{{function_node __inference_run_106}}{{node dense_1/Add/ReadVariableOp}}]]
0 successful operations.
0 derived errors ignored.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/iantolic-soban/tf_bug/.venv/bin/saved_model_cli", line 8, in <module>
    sys.exit(main())
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/tools/saved_model_cli.py", line 1340, in main
    app.run(smcli_main)
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/tools/saved_model_cli.py", line 1338, in smcli_main
    args.func()
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/tools/saved_model_cli.py", line 1036, in run
    run_saved_model_with_feed_dict(
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/tools/saved_model_cli.py", line 721, in run_saved_model_with_feed_dict
    outputs = sess.run(output_tensor_names_sorted, feed_dict=inputs_feed_dict)
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 971, in run
    result = self._run(None, fetches, feed_dict, options_ptr,
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 1214, in _run
    results = self._do_run(handle, final_targets, final_fetches,
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 1394, in _do_run
    return self._do_call(_run_fn, feeds, fetches, targets, options,
  File "/home/iantolic-soban/tf_bug/.venv/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 1420, in _do_call
    raise type(e)(node_def, op, message)  # pylint: disable=no-value-for-parameter
tensorflow.python.framework.errors_impl.FailedPreconditionError: Graph execution error:

2 root error(s) found.
  (0) FAILED_PRECONDITION: Could not find variable dense/bias. This could mean that the variable has been deleted. In TF1, it can also mean the variable is uninitialized. Debug info: container=localhost, status error message=Resource localhost/dense/bias/N10tensorflow3VarE does not exist.
	 [[{{node dense_1/Add/ReadVariableOp}}]]
	 [[StatefulPartitionedCall/_21]]
  (1) FAILED_PRECONDITION: Could not find variable dense/bias. This could mean that the variable has been deleted. In TF1, it can also mean the variable is uninitialized. Debug info: container=localhost, status error message=Resource localhost/dense/bias/N10tensorflow3VarE does not exist.
	 [[{{node dense_1/Add/ReadVariableOp}}]]
0 successful operations.
0 derived errors ignored.

@ivansoban ,
This is a consequence of Tensorflow moving to Keras 3. Tensorflow 2.15 and lower use Keras 2 by default. Tensorflow 2.16 and higher use Keras 3 by default. Some background here.
Keras 3 is multi-backend, so the Model class and Layer class no longer inherit from tf.Module to be compatible with JAX and Torch. One consequenceis that variables are no longer automatically tracked recursively through models and layers.
To solve this, you have several options:

revert to tf_keras (Keras 2) by using TF_USE_LEGACY_KERAS=1 on the command line or this in Python before importing tensorflow:

import os
os.environ["TF_USE_LEGACY_KERAS"] = "1"

use the Keras export API: either model.export() or ExportArchive.
manually track variables from the layers in your module, which is basically reimplementing some of the logic in ExportArchive, but I do not recommend this approach.

Thank you @hertschuh for the information and solutions.
If I am understanding the implications of the move from Keras 2 to 3 correctly, the saving of a Keras 3 layer/model as an instance variable within a tf.Module is no longer really feasible if we want to export the tf.Module as a SavedModel. That is unless we want to pursue option 3 which does seem like a poor choice.


Possible bug using SubmissionQueueEvent::prep_timeout

Trying to submit a timeout, I obtain an invalid argument error:
use std::io;
use iou::sys;

#[test]
fn timeout_test() -> io::Result<()> {
    let mut io_uring = iou::IoUring::new(2)?;

    let mut sq = io_uring.sq();
    let mut sqe = sq.next_sqe().unwrap();

    // make a timeout
    let timeout_spec: _ = sys::__kernel_timespec {
        tv_sec:  0 as _,
        tv_nsec: 2e8 as _,
    };

    unsafe { sqe.prep_timeout(&timeout_spec); }

    io_uring.sq().submit()?;

    // check that timeout reading works
    {
        let mut cq = io_uring.cq();
        let cqe = cq.wait_for_cqe()?;
        assert!(cqe.is_timeout());
    }

    Ok(())
}

running 1 test
Error: Os { code: 22, kind: InvalidInput, message: "Invalid argument" }
thread 'timeout_test' panicked at 'assertion failed: `(left == right)`

In iou, the timeout file descriptor is set to 0.
https://github.com/withoutboats/iou/blob/427273598e9ab7759a19b6301803eaba870dfc18/src/sqe.rs#L183
In liburing, it looks like the file descriptor is set to -1 based on:

static inline void io_uring_prep_timeout(struct io_uring_sqe *sqe,
					 struct __kernel_timespec *ts,
					 unsigned count, unsigned flags)
{
        io_uring_prep_rw(IORING_OP_TIMEOUT, sqe, -1, ts, 1, count);
//                                                ^ the fd arg

source
and
static inline void io_uring_prep_rw(int op, struct io_uring_sqe *sqe, int fd,
				    const void *addr, unsigned len,
				    off_t offset)

source
Changing the fd from 0 to -1 in SubmissionQueueEvent::prep_timeout, I then obtain a BADFILE error:
running 1 test
Error: Os { code: 9, kind: Other, message: "Bad file descriptor" }
thread 'timeout_test' panicked at 'assertion failed: `(left == right)`

Am I doing something silly here? Maybe there's something up with my kernel version (5.2.14)?
Thank you for your time.

Looks like this was changed in liburing upstream in 3c9d9580.
Interestingly I also see a bad file descriptor when running the liburing timeout test, but there is every possibility that I'm confused.  😃
$ git log --oneline|head -n1
5943354 test/connect: fixup a few style issues
$ test/timeout
test_single_timeout: Timeout: Bad file descriptor
test_single_timeout failed

I saw when I updated the submodule in uring-sys that several of these prep APIs have started passing -1 for the fd, though I haven't investigated the impact of that. Someone should figure that out.
But my guess as to the most likely reason this is failing for y'all even after the change is that your kernel doesn't actually support timeouts! I'm certain the one I've been testing against (5.2.11) doesn't. This feature was added to the io_uring interface since September, I'm not sure what version number is the first to have timeouts but its extremely recent.

I'm sorry for jumping the gun, timeout support looks like it was included in 5.4, which was released... five days ago 😅.
For the fd as -1, it seems like a conceptual change (-1 more invalid than 0) but without any material difference.
3c9d9580 commit msg:

If an operation doesn't need a file, set fd to an invalid value.
This would help to spot an unwanted fdget() in the kernel, and is
conceptually more correct (though negotiable)

My impression is keeping the fd's 0 shouldn't break timeouts, nops, etc. (when they're supported).

Cool!
As to the -1, if we're currently setting any of them to 0 we should stop. Either we set them to a junk value (-1) like liburing does, or we just don't set them. Setting them to 0 does absolutely nothing for us.

While the commit message in liburing sounds like its more concerned with the developers testing the io_uring interface, my main concern would be having the most compatible outcome with old kernels that don't recognize the operation your using. To that end we wouldn't want it to accidentally perform some other operation on a valid fd the program is using.
It's sort of interesting that you got EBADFILE when you set the fd to -1 instead of still getting EINVAL.. Suggests the kernel version your using is checking the fd before checking if the fd is even needed for this op.
I think we should set this to -1 like liburing does, to be most safe on systems that don't support the op.

Another more holistic option is to pursue withoutboats/uring-sys#4 and expose all the prep_* functions in uring-sys, then just call those from iou instead of redefining them in Rust and having to worry about these nuances!


Fix #367

Attempting to fix issue #367

Please explain the change and remove the unscoped GitHub attribute. The unscoped link will mess with all monotree repos, not just this one.

@MarcoFalke what is an unscoped github attribute please?

#367 is unscoped. At the very least it should say bitcoin-core/gui#374.

#367 is unscoped. At the very least it should say bitcoin-core/gui#374.

A pull/issue always defaults to the same project that it's in - it's only necessary to add the project if it's a different project to that which the pull/issue is in.

How do I change this to a draft pull request? I think there may be a chance of Segmentation fault in this code.

A pull/issue always defaults to the same project that it's in - it's only necessary to add the project if it's a different project to that which the pull/issue is in.

This is a monotree project. Meaning that different project will have the same tree and share the (merge) commits. So without a scope it won't be trivially possible to recover the metadata.

A pull/issue always defaults to the same project that it's in - it's only necessary to add the project if it's a different project to that which the pull/issue is in.

Rather than arguing the point, how about just updating the link. As mentioned, having an unscoped link will mess with our merge process / resultant commit messages.

How do I change this to a draft pull request?

Click the button that says "Convert to draft"

You do realise you could read the GitHub documentation, or use any search engine to also find the answer to that question? Rather than posting another comment here?
I'd suggest you spend some time reading this projects developer docs and contributing guide. Opening a PR with no title, no explanation of the change, a useless commit message, and no commit body is not the standard that is expected here. I'm also almost certain you are aware of that, given you've been around the project for many years now.

OTOH, this change re-introduces #191 bug.

OTOH, this change re-introduces #191 bug.

Out of the two bugs #191 or #367 - I'd rather have former than the latter.

I'm trying to understand the issue. I can't fix something when I'm not aware of the problem.

There are two issues with the commit message:

The hashtag is missing the repo namespace, so when the commit gets pushed to another repo it can't be resolved properly.
The commit message is lacking any sort of explanation.

You can read our contributing guide to learn on how to create patches:  https://github.com/bitcoin-core/gui/blob/master/CONTRIBUTING.md#committing-patches . It also links to a guide on how to write commit messages.

I still don't understand why this does not work:

By default, the model dynamically re-sorts and re-filters data whenever the original model changes.

And we have dynamicSortFilter == true for sure.

The hashtag is missing the repo namespace, so when the commit gets pushed to another repo it can't be resolved properly.

Ah, I understand now - you're implying that it will also get pushed to https://github.com/bitcoin/bitcoin, yes?

The commit message is lacking any sort of explanation.

"Fixes #367" is an explanation. so I would disagree with your statement, but if it gets pushed to another repository then I can understand how it could point people to the wrong information. I'm not really understanding why we have two repositories with duplicate code though. Is there an explanation for this somewhere?

You can read our contributing guide to learn on how to create patches: https://github.com/bitcoin-core/gui/blob/master/CONTRIBUTING.md#committing-patches . It also links to a guide on how to write commit messages.

Thanks. I shall read it now.

My previous comment about using of layoutAboutToBeChanged and layoutChanged signals is not correct because it should be applied to cases when no proxy models are used.
I believe that correct fix of #367 is suggested in #375.

Does 71ab42d00e12c3bbdf3ca588da6408ec209a10d8 actually revert ecbd91153875c8cdd5b92b840afc116f65e457fb?

Closing due to the #375 is merged.


currentFrame NULL reference

Phantomjs crashes when I have a popup window with an iframe that closes and I try to switch back to the main frame. The crash occurs because a debug line tries to access the frameName of the now not existing frame.
The Issue (and solution) is described here: "Crashing when switching to main frame" https://github.com/ariya/phantomjs/issues/11103.
Issue https://github.com/ariya/phantomjs/issues/11103 was merged into issue https://github.com/ariya/phantomjs/issues/10947 and closed, but was never solved.

Now fixed properly by #12109.


Linux/arm64 CI failing - Cannot find binary for platform linux with architecture arm64

Thank you for reporting a bug! We appreciate it very much. Issues are a big input into the priorities for Pact development
All italic text in this template is safe to remove before submitting
Thanks again!
Software versions
Please provide at least OS and version of pact-js

OS: _e.g. Linux
Node Version: 16.18.1

Issue Checklist
Please confirm the following:

[x] I have upgraded to the latest
[x] I have the read the FAQs in the Readme
[x] I have triple checked, that there are no unhandled promises in my code
[x] I have set my log level to debug and attached a log file showing the complete request/response cycle

Expected behaviour
No errors in CI machine
Actual behaviour
getting error
Error: Error while locating pact binary: Cannot find binary for platform 'linux' with architecture 'arm64'.
| at throwError (/workdir/node_modules/@pact-foundation/pact-core/standalone/install.ts:7:9)
  | at Object.getBinaryEntry (/workdir/node_modules/@pact-foundation/pact-core/standalone/install.ts:51:9)
  | at Object.standalone (/workdir/node_modules/@pact-foundation/pact-core/src/pact-standalone.ts:40:5)
  | at Object. (/workdir/node_modules/@pact-foundation/pact-core/src/pact-standalone.ts:72:16)
  | at Module._compile (node:internal/modules/cjs/loader:1155:14)
  | at Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
  | at Object.require.extensions. [as .js] (/workdir/node_modules/ts-node/src/index.ts:1608:43)
  | at Module.load (node:internal/modules/cjs/loader:1033:32)
  | at Function.Module._load (node:internal/modules/cjs/loader:868:12)
  | at Module.require (node:internal/modules/cjs/loader:1057:19)
  | at require (node:internal/modules/cjs/helpers:103:18)
  | at Object. (/workdir/node_modules/@pact-foundation/pact-core/src/server.ts:2:1)
  | at Module._compile (node:internal/modules/cjs/loader:1155:14)
  | at Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
  | at Object.require.extensions. [as .js] (/workdir/node_modules/ts-node/src/index.ts:1608:43)
  | at Module.load (node:internal/modules/cjs/loader:1033:32)
  | at Function.Module._load (node:internal/modules/cjs/loader:868:12)
  | at Module.require (node:internal/modules/cjs/loader:1057:19)
  | at require (node:internal/modules/cjs/helpers:103:18)
  | at Object. (/workdir/node_modules/@pact-foundation/pact-core/src/pact.ts:2:1)
  | at Module._compile (node:internal/modules/cjs/loader:1155:14)
  | at Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
  | at Object.require.extensions. [as .js] (/workdir/node_modules/ts-node/src/index.ts:1608:43)
  | at Module.load (node:internal/modules/cjs/loader:1033:32)
  | at Function.Module._load (node:internal/modules/cjs/loader:868:12)
  | at Module.require (node:internal/modules/cjs/loader:1057:19)
  | at require (node:internal/modules/cjs/helpers:103:18)
  | at Object. (/workdir/node_modules/@pact-foundation/pact-core/src/index.ts:1:1)
  | at Module._compile (node:internal/modules/cjs/loader:1155:14)
  | at Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
  | at Object.require.extensions. [as .js] (/workdir/node_modules/ts-node/src/index.ts:1608:43)
  | at Module.load (node:internal/modules/cjs/loader:1033:32)
  | at Function.Module._load (node:internal/modules/cjs/loader:868:12)
  | at Module.require (node:internal/modules/cjs/loader:1057:19)
  | at require (node:internal/modules/cjs/helpers:103:18)
  | at Object. (/workdir/node_modules/@pact-foundation/src/httpPact/index.ts:2:1)
  | at Module._compile (node:internal/modules/cjs/loader:1155:14)
  | at Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
  | at Object.require.extensions. [as .js] (/workdir/node_modules/ts-node/src/index.ts:1608:43)
  | at Module.load (node:internal/modules/cjs/loader:1033:32)
  | at Function.Module._load (node:internal/modules/cjs/loader:868:12)
  | at Module.require (node:internal/modules/cjs/loader:1057:19)
  | at require (node:internal/modules/cjs/helpers:103:18)
  | at Object. (/workdir/node_modules/@pact-foundation/src/index.ts:25:1)
  | at Module._compile (node:internal/modules/cjs/loader:1155:14)
  | at Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
  | at Object.require.extensions. [as .js] (/workdir/node_modules/ts-node/src/index.ts:1608:43)
  | at Module.load (node:internal/modules/cjs/loader:1033:32)
  | at Function.Module._load (node:internal/modules/cjs/loader:868:12)
  | at Module.require (node:internal/modules/cjs/loader:1057:19)
  | at require (node:internal/modules/cjs/helpers:103:18)
  | at Object. (/workdir/src/create/create.test.ts:2:1)
  | at Module._compile (node:internal/modules/cjs/loader:1155:14)
  | at Module.m._compile (/workdir/node_modules/ts-node/src/index.ts:1618:23)
  | at Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
  | at Object.require.extensions. [as .ts] (/workdir/node_modules/ts-node/src/index.ts:1621:12)
  | at Module.load (node:internal/modules/cjs/loader:1033:32)
  | at Function.Module._load (node:internal/modules/cjs/loader:868:12)
  | at Module.require (node:internal/modules/cjs/loader:1057:19)
  | at require (node:internal/modules/cjs/helpers:103:18)
  | at Object.exports.requireOrImport (/workdir/node_modules/mocha/lib/nodejs/esm-utils.js:49:16)
  | at async Object.exports.loadFilesAsync (/workdir/node_modules/mocha/lib/nodejs/esm-utils.js:91:20)
  | at async singleRun (/workdir/node_modules/mocha/lib/cli/run-helpers.js:125:3)
  | at async Object.exports.handler (/workdir/node_modules/mocha/lib/cli/run.js:370:5)
  | 🚨 Error: The command exited with status 1

Thanks. I think this is captured elsewhere but will have to look.
See also https://github.com/pact-foundation/pact-js-core/pull/407 and #347

Running a Linux VM, I am unable to install pact on my local project due to this.
➜  test-project uname -mo
aarch64 GNU/Linux

➜  test-project npm i<EMAIL_ADDRESS>npm WARN deprecated<EMAIL_ADDRESS>This is a stub types definition. pino-std-serializers provides its own type definitions, so you do not need this installed.
npm WARN deprecated<EMAIL_ADDRESS>This is a stub types definition. pino-pretty provides its own type definitions, so you do not need this installed.
npm WARN deprecated<EMAIL_ADDRESS>This module is not used anymore. npm config is parsed by npm itself and by @npmcli/config
npm ERR! code 1
npm ERR! path /root/Development/atlassian/test/node_modules/@pact-foundation/pact-node
npm ERR! command failed
npm ERR! command sh -c node postinstall.js
npm ERR! /root/Development/atlassian/test/node_modules/@pact-foundation/pact-node/standalone/install.js:42
npm ERR!     throw new Error(chalk_1.default.red("Error while installing binary: " + msg));
npm ERR!     ^
npm ERR!
npm ERR! Error: Error while installing binary: Cannot find binary for platform 'linux' with architecture 'arm64'.
npm ERR!     at throwError (/root/Development/atlassian/test/node_modules/@pact-foundation/pact-node/standalone/install.js:42:11)
npm ERR!     at getBinaryEntry (/root/Development/atlassian/test/node_modules/@pact-foundation/pact-node/standalone/install.js:282:11)
npm ERR!     at setup (/root/Development/atlassian/test/node_modules/@pact-foundation/pact-node/standalone/install.js:286:17)
npm ERR!     at /root/Development/atlassian/test/node_modules/@pact-foundation/pact-node/standalone/install.js:319:12
npm ERR!     at Object.<anonymous> (/root/Development/atlassian/test/node_modules/@pact-foundation/pact-node/postinstall.js:3:1)
npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1105:14)
npm ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
npm ERR!     at Module.load (node:internal/modules/cjs/loader:981:32)
npm ERR!     at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
npm ERR!     at node:internal/main/run_main_module:17:47

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-12-08T01_18_41_776Z-debug-0.log

Thanks @alshdavid. I appreciate the problem, but don't have a straightforward solution.
If you are running docker for that "VM", you could add the --platform linux/amd64 flag to emulate x86_64 but appreciate that might not be a long term solution.
I think this package may need to be split, or the (non-Ruby based) code moved from here into Pact JS.
Given that parts of this package (the parts that use the Ruby core) work in some architectures and others don't, I don't think we have much choice other than to state that this package doesn't work in a bunch of architectures, which I think is not right.

Please follow this issue https://github.com/pact-foundation/pact-js/issues/1067 for progress.
TL;DR - the CLI which is the root cause of this compatibility issue, will be removed from this project as a dependency in the next major release.

@mefellows is there a work around for this as it is currently blocking me from using pact in my project.

The plan above is to move the ruby binaries out of this project.
For now, there is a workaround listed here: https://github.com/pact-foundation/pact-js-core/pull/407

I've been making some changes to the travelling-ruby system that we use to package pact-ruby-standalone, in order to support arm64 on osx and linux, it also provides updates to Ruby 3.1.2 and windows 32 bit binaries (currently it only provides 64 bit)
PR here https://github.com/phusion/traveling-ruby/pull/132
Releases here https://github.com/YOU54F/pact-ruby-standalone/releases/tag/v<IP_ADDRESS>-alpha
I've tested them out against pact-js-core
https://www.npmjs.com/package/@you54f/pact-core/v/13.14.0?activeTab=code
https://github.com/pact-foundation/pact-js-core/compare/master...YOU54F:pact-js-core:master
and against the old 9.x.x / pact-node branch
https://www.npmjs.com/package/@you54f/pact-node/v/10.18.0?activeTab=code
The size on the pact-core is concerning tho, it's a chonki boi as it contains the pact ruby standalone and the ffi for every platform, regardless of the downloading platform.
I wondered how small we could make it if we could remove standalone, and ffi from the package and download on pre install with this janky script
https://www.npmjs.com/package/@you54f/pact-core?activeTab=code  499 kB vs 401mb (it currently sits at 215mb https://www.npmjs.com/package/@pact-foundation/pact-core)

https://github.com/YOU54F/pact-js-core/blob/install_pact_ffi/preinstallffi.js (pre install with no external deps)
https://github.com/YOU54F/pact-js-core/blob/install_pact_ffi/binding.gyp (more platform and arch specific node gyp file)

But these will suffer from all the problems users have of not being able to run pre/post install scripts, issues downloading binaries.
I think the plan to split out the ruby binaries is properly wise, they can be packaged in a separate npm package, and the uplift for users should be quite small.

pact-js-core now supports linux arm64 for both the pact ruby standalone binaries, and the pact ffi
you can find a version with support for both in
<EMAIL_ADDRESS>


Working in React Native 0.62.2 (iOS)

Really appreciate the work that @jvandenaardweg went to over in issue #182 to try and help everybody out, but I thought I'd open this here to share a solution that doesn't need to modify build settings or fork any repos. I would suggest just writing your own share extension and using some skeleton code from this issue. You can still follow most of the install steps, but without importing this lib, and a few additional steps.

Create your iOS share extension (in current install steps)

In X-Code, having opened up your project

File > New > Target -> ShareExtension

In your podfile, set your target to use all of the react-native libs

# right below use_native_modules!

# for share extension
  target 'name_of_your_share' do
    use_native_modules!
    inherit! :complete
  end

Replace the default code with an extension of UIViewController and implement viewDidLoad to load react native

MyShareExtension.h
#import <UIKit/UIKit.h>
#import <React/RCTBridgeModule.h>

@interface MyShareExtension : UIViewController<RCTBridgeModule>
@end

MyShareExtension.m
#import "MyShareExtension.h"
#import <React/RCTRootView.h>
#import <React/RCTBundleURLProvider.h>

NSExtensionContext* extensionContext;

@implementation MyShareExtension {
}

RCT_EXPORT_MODULE();

- (void) viewDidLoad {
  [super viewDidLoad];

  extensionContext = self.extensionContext; // global for later call to async promise

  // set up react native instance
  NSURL *jsCodeLocation;

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL: jsCodeLocation
                                               moduleName: @"your_target_react_native_app" // AppRegistry.registerComponent("your_target_react_native_app", App)
                                               initialProperties: nil
                                                   launchOptions: nil];

  UIViewController *rootViewController = [UIViewController alloc];
  rootViewController.view = rootView;
  [self addChildViewController: rootViewController];

  rootViewController.view.frame = self.view.bounds;
  rootViewController.view.translatesAutoresizingMaskIntoConstraints = false;
  [[self view] addSubview:rootViewController.view];
  NSArray* constraints = [NSArray arrayWithObjects:
                          [rootViewController.view.leftAnchor constraintEqualToAnchor: self.view.leftAnchor],
                          [rootViewController.view.rightAnchor constraintEqualToAnchor: self.view.rightAnchor],
                          [rootViewController.view.topAnchor constraintEqualToAnchor: self.view.topAnchor],
                          [rootViewController.view.bottomAnchor constraintEqualToAnchor: self.view.bottomAnchor], nil
                        ];
  [NSLayoutConstraint activateConstraints:constraints];

  [self didMoveToParentViewController: self];

}

Pretty much copy the content from this lib and expose methods to react native to fetch the parameters capturing from the share extension

// top of file
#import <MobileCoreServices/MobileCoreServices.h>

#define URL_IDENTIFIER (NSString *)kUTTypeURL
#define IMAGE_IDENTIFIER (NSString *)kUTTypeImage

// ... more code

RCT_REMAP_METHOD(getParameters,
                 resolver:(RCTPromiseResolveBlock)resolve
                 rejecter:(RCTPromiseRejectBlock)reject)
{
    [self extractData: extensionContext withCallback:^(NSDictionary* result, NSException* err) {
        if(err) {
            reject(@"error", err.description, nil);
        } else {
            resolve(result);
        }
    }];
}

- (void) extractData: (NSExtensionContext *)context withCallback:(void(^)(NSDictionary* result, NSException *exception))callback {
  @try {

    // get items shared
    NSExtensionItem *item = [context.inputItems firstObject];
    __block NSItemProvider *provider = item.attachments.firstObject;

    if ([provider hasItemConformingToTypeIdentifier:IMAGE_IDENTIFIER]){
      [provider loadItemForTypeIdentifier:IMAGE_IDENTIFIER options:nil completionHandler:^(id<NSSecureCoding> item, NSError *error) {
        NSURL *url = (NSURL *)item;
        NSDictionary *result = @{@"data": [url absoluteString], @"extension": [[[url absoluteString] pathExtension] lowercaseString], @"type": @"image"};
        if(callback) {
            callback(result, nil);
        }
      }];
      return;
    }

    if([provider hasItemConformingToTypeIdentifier:URL_IDENTIFIER]) {
      [provider loadItemForTypeIdentifier:URL_IDENTIFIER options:nil completionHandler:^(id<NSSecureCoding> item, NSError *error) {
        NSURL *url = (NSURL *)item;
        NSDictionary *result = @{@"data": [url absoluteString], @"type": @"url"};
        if(callback) {
            callback(result, nil);
        }
      }];

      return;

    }

    if(callback) {
      callback(nil, [NSException exceptionWithName:@"Error" reason:@"couldn't find provider" userInfo:nil]);
    }
  }
  @catch (NSException *exception) {
  }
}

Conclusion
You still need to follow the install steps to restrict the types that your app can receive (The plist) and ensure the transport settings let you connect to the react native bundler server, but these were the most critical steps to getting my share extension working.

@ortonomy Thanks a lot. It was working perfectly for me until I tried to add expo-notifications in my project. As soon as I add import * as Notifications from 'expo-notifications'; in the main app, I see a blank screen in the share extension. Did you ever encounter something similar to this by any chance?
Here's my pod file:
`platform :ios, '11.0'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
def add_flipper_pods!(versions = {})
versions['Flipper'] ||= '~> 0.33.1'
versions['DoubleConversion'] ||= '1.1.7'
versions['Flipper-Folly'] ||= '~> 2.1'
versions['Flipper-Glog'] ||= '0.3.6'
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
versions['Flipper-RSocket'] ||= '~> 1.0'
pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
List all transitive dependencies for FlipperKit pods
to avoid them being linked in Release builds
pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
end
Post Install processing for Flipper
def flipper_post_install(installer)
installer.pods_project.targets.each do |target|
if target.name == 'YogaKit'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end
end
target 'myapp' do
Pods for myapp
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
use_unimodules!
use_native_modules!
Enables Flipper.

Note that if you have use_frameworks! enabled, Flipper will not work and
you should disable these next few lines.
add_flipper_pods!
target 'MyShareEx' do
use_native_modules!
inherit! :complete
end
post_install do |installer|
flipper_post_install(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
end
end
end
end`

https://github.com/alinz/react-native-share-extension/issues/48#issuecomment-317587122 resolved the issue.

@ortonomy Hey. you tried to use Share in aios 14? My code worked fine for ios 13 and below, but with the transitions to ios 14, an empty window is displayed and quickly closes. I haven't changed the code until I can understand what could be the reason

@ortonomy Hey. you tried to use Share in ios 14? My code worked fine for ios 13 and below, but with the transitions to ios 14, an empty window is displayed and quickly closes. I haven't changed the code until I can understand what could be the reason
in the simulator - works great, on a real device - no

I have the same issue.

hi @mgvictor7 and @azesmway -- mine is working on iOS 14:

For reference, I've upgraded to the latest React Native (0.63.2) which has an upgrade guide here which massively simplifies your pod file: https://react-native-community.github.io/upgrade-helper/?from=0.62.2&to=0.63.2
For example, after upgrade, this is what my pod file looks like:
# frozen_string_literal: true

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'

target 'KeewishReact' do
  config = use_native_modules!

  use_react_native!(path: config['reactNativePath'])

  #   # React native permissions
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-Camera', path: "#{permissions_path}/Camera.podspec"

  # for share extension
  target 'KeewishShare' do
    inherit! :complete
  end

  target 'KeewishReactTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!

  post_install do |installer|
    flipper_post_install(installer)

    # https://github.com/facebook/react-native/issues/25792
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
      end
    end
  end
end

FYI: I also have NOT used this extension. I built it myself based on content of this extension:

header

//
//  ShareViewController.h
//  KeewishShare
//
//  Created by Gregory Orton on 24/07/2020.
//

#import <UIKit/UIKit.h>
#import <React/RCTBridgeModule.h>

@interface KeewishShareExtension : UIViewController<RCTBridgeModule>
  - (void) shareView;
@end

.m

//
//  ShareViewController.m
//  KeewishShare
//
//  Created by Gregory Orton on 24/07/2020.
//

#import <Foundation/Foundation.h>
#import "KeewishShareExtension.h"
#import <React/RCTRootView.h>
#import <React/RCTBundleURLProvider.h>
#import <MobileCoreServices/MobileCoreServices.h>

NSExtensionContext* extensionContext;

#define URL_IDENTIFIER (NSString *)kUTTypeURL
#define IMAGE_IDENTIFIER (NSString *)kUTTypeImage
//#define TEXT_IDENTIFIER (NSString *)kUTTypePlainText

@implementation KeewishShareExtension {
}

RCT_EXPORT_MODULE();

- (void) shareView {
  extensionContext = self.extensionContext; // global for later call to async promise

  // set up react native instance
  NSURL *jsCodeLocation;

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL: jsCodeLocation
                                               moduleName: @"KeewishReactShare"
                                               initialProperties: nil
                                                   launchOptions: nil];

  UIViewController *rootViewController = [UIViewController alloc];
  rootViewController.view = rootView;
  [self addChildViewController: rootViewController];

  rootViewController.view.frame = self.view.bounds;
  rootViewController.view.translatesAutoresizingMaskIntoConstraints = false;
  [[self view] addSubview:rootViewController.view];
  NSArray* constraints = [NSArray arrayWithObjects:
                          [rootViewController.view.leftAnchor constraintEqualToAnchor: self.view.leftAnchor],
                          [rootViewController.view.rightAnchor constraintEqualToAnchor: self.view.rightAnchor],
                          [rootViewController.view.topAnchor constraintEqualToAnchor: self.view.topAnchor],
                          [rootViewController.view.bottomAnchor constraintEqualToAnchor: self.view.bottomAnchor], nil
                        ];
  [NSLayoutConstraint activateConstraints:constraints];

  [self didMoveToParentViewController: self];
}

- (void) viewDidLoad {
  [super viewDidLoad];

  // object variable for extension doesn't work for react-native. It must be assigned to gloabl
  // variable extensionContext
  extensionContext = self.extensionContext;

  // generate react native bundle and views
  [self shareView];

}

RCT_REMAP_METHOD(getParameters,
                 resolver:(RCTPromiseResolveBlock)resolve
                 rejecter:(RCTPromiseRejectBlock)reject)
{
    [self extractData: extensionContext withCallback:^(NSDictionary* result, NSException* err) {
        if(err) {
            reject(@"error", err.description, nil);
        } else {
            resolve(result);
        }
    }];
}

- (void) extractData: (NSExtensionContext *)context withCallback:(void(^)(NSDictionary* result, NSException *exception))callback {
  @try {

    // get items shared
    NSExtensionItem *item = [context.inputItems firstObject];
    __block NSItemProvider *provider = item.attachments.firstObject;

    if ([provider hasItemConformingToTypeIdentifier:IMAGE_IDENTIFIER]){
      [provider loadItemForTypeIdentifier:IMAGE_IDENTIFIER options:nil completionHandler:^(id<NSSecureCoding> item, NSError *error) {
        NSURL *url = (NSURL *)item;
        NSDictionary *result = @{@"data": [url absoluteString], @"extension": [[[url absoluteString] pathExtension] lowercaseString], @"type": @"image"};
        if(callback) {
            callback(result, nil);
        }
      }];
      return;
    }

    if([provider hasItemConformingToTypeIdentifier:URL_IDENTIFIER]) {
      [provider loadItemForTypeIdentifier:URL_IDENTIFIER options:nil completionHandler:^(id<NSSecureCoding> item, NSError *error) {
        NSURL *url = (NSURL *)item;
        NSDictionary *result = @{@"data": [url absoluteString], @"type": @"url"};
        if(callback) {
            callback(result, nil);
        }
      }];

      return;

    }

//    if ([provider hasItemConformingToTypeIdentifier:TEXT_IDENTIFIER]){
//      NSString *text = (NSString *)provider;
//      return;
//    }

    if(callback) {
      callback(nil, [NSException exceptionWithName:@"Error" reason:@"couldn't find provider" userInfo:nil]);
    }
  }
  @catch (NSException *exception) {
  }
}

RCT_EXPORT_METHOD(close) {
  [extensionContext completeRequestReturningItems:nil
                    completionHandler:nil];
//  exit(0);
}

+ (BOOL)requiresMainQueueSetup
{
  // only do this if your module initialization relies on calling UIKit!
  return YES;
}

@end

@ortonomy Hi. If it is possible, can I see - KeewishShareExtension.h, KeewishShareExtension.m and index.js, since my transparent window pops up and everything, tried in various ways?

@azesmway - you just saw them. I've labelled them.

@ortonomy I apologize for my english, I am writing through google translator. I tried to repeat everything as you wrote - an empty window appears and nothing happens

@ortonomy thanks for everything. But still can't get it to work on real devices.
When execute this code un real device
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
jsCodeLocation return null!
When execute in the simulator, jsCodeLocation return http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false

@mgvictor7 Hi. The solution from this post helped me. Worked on a real device
https://github.com/alinz/react-native-share-extension/issues/182#issuecomment-587006020

@ortonomy But now there is a new problem. Opening the sharing window causes the entire application to start and in no way can I restrict this launch.
AppRegistry.registerComponent ('MyShare', () => MyShare)
AppRegistry.registerComponent (appName, () => App)

Calling "MyShare" compiles and runs "App"

Hey @ortonomy,
Thanks for the walkthrough! It works almost perfectly. I am having an issue retrieving the data on the native side, it is return an error of null.
Do you know what is missing? I can see the modal and everything just no data.

You need to access your module from import { NativeModules } from 'react-native'
NativeModules.your_module_name.data().then(d => ....)

@ortonomy appreciate you putting together this solution. Could you show your JavaScript usage of your functioning product? I’m going to make a tutorial following your instructions to hopefully help some people (including myself) out with this.

Thank you for your help w/ this, @ortonomy .
I'm developing a basic sharing starter app & am running into the following compilation-time error:
Apple Mach-O Linker Error
"_OBJC_CLASS_$_RCTRootView", referenced from:
"_OBJC_CLASS_$_RCTBundleURLProvider", referenced from:
"_RCTRegisterModule", referenced from:
Linker command failed with exit code 1 (use -v to see invocation)

It appears that maybe the the share extension doesn't know where to look for React Native dependencies?
Have tried:

Adding $(inherited) in header & library search paths (no real change in functionality)
Adding the React Libraries to the ShareExtension dependencies (then, it can't find the newly-added dependencies)
Using Legacy Mode to compile (just shows a different version of the error above)

Any pointers on what I'm doing wrong?  Again, thank you for all your help.
react-native-share-starter
Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'

target 'episogood' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'EpisogoodShare' do
    inherit! :complete
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
      end
    end
  end
end

ShareviewController.h
#import <UIKit/UIKit.h>
#import <React/RCTBridgeModule.h>

@interface ShareViewController : UIViewController<RCTBridgeModule>
@end

ShareviewController.m
#import "ShareViewController.h"
#import <React/RCTRootView.h>
#import <React/RCTBundleURLProvider.h>
#import <MobileCoreServices/MobileCoreServices.h>

#define URL_IDENTIFIER (NSString *)kUTTypeURL

NSExtensionContext* extensionContext;

@implementation ShareViewController {
}

RCT_EXPORT_MODULE();

- (void) viewDidLoad {
  [super viewDidLoad];

  extensionContext = self.extensionContext; // global for later call to async promise

  // set up react native instance
  NSURL *jsCodeLocation;

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL: jsCodeLocation
                                               moduleName: @"Share"
                                               initialProperties: nil
                                                   launchOptions: nil];

  UIViewController *rootViewController = [UIViewController alloc];
  rootViewController.view = rootView;
  [self addChildViewController: rootViewController];

  rootViewController.view.frame = self.view.bounds;
  rootViewController.view.translatesAutoresizingMaskIntoConstraints = false;
  [[self view] addSubview:rootViewController.view];
  NSArray* constraints = [NSArray arrayWithObjects:
                          [rootViewController.view.leftAnchor constraintEqualToAnchor: self.view.leftAnchor],
                          [rootViewController.view.rightAnchor constraintEqualToAnchor: self.view.rightAnchor],
                          [rootViewController.view.topAnchor constraintEqualToAnchor: self.view.topAnchor],
                          [rootViewController.view.bottomAnchor constraintEqualToAnchor: self.view.bottomAnchor], nil
                        ];
  [NSLayoutConstraint activateConstraints:constraints];

  [self didMoveToParentViewController: self];

}

RCT_REMAP_METHOD(getParameters,
                 resolver:(RCTPromiseResolveBlock)resolve
                 rejecter:(RCTPromiseRejectBlock)reject)
{
    [self extractData: extensionContext withCallback:^(NSDictionary* result, NSException* err) {
        if(err) {
            reject(@"error", err.description, nil);
        } else {
            resolve(result);
        }
    }];
}

- (void) extractData: (NSExtensionContext *)context withCallback:(void(^)(NSDictionary* result, NSException *exception))callback {
  @try {

    // get items shared
    NSExtensionItem *item = [context.inputItems firstObject];
    __block NSItemProvider *provider = item.attachments.firstObject;

    if([provider hasItemConformingToTypeIdentifier:URL_IDENTIFIER]) {
      [provider loadItemForTypeIdentifier:URL_IDENTIFIER options:nil completionHandler:^(id<NSSecureCoding> item, NSError *error) {
        NSURL *url = (NSURL *)item;
        NSDictionary *result = @{@"data": [url absoluteString], @"type": @"url"};
        if(callback) {
            callback(result, nil);
        }
      }];

      return;

    }

    if(callback) {
      callback(nil, [NSException exceptionWithName:@"Error" reason:@"couldn't find provider" userInfo:nil]);
    }
  }
  @catch (NSException *exception) {
  }
}

@end

You need to access your module from import { NativeModules } from 'react-native'
NativeModules.your_module_name.data().then(d => ....)

Hello, I used your guide to have this library working, I'm able to get the data on my "Sharing" extension
`import {AppRegistry} from 'react-native';
import App from './App';
import {name as appName} from './app.json';
import Share from './Share';
AppRegistry.registerComponent('AlertaShare', () => Share) <---- Can access data here using NativeModules
AppRegistry.registerComponent(appName, () => App);`
but I'm stuck trying to move that data to my main react native app, wondering if you have any pointers, tried using Linking but it for whatever reason it does not work

@ReneMarquez -- use redux/mobx  and redux-persist to share state? In iOS the share applet and the react native app are essentially two different apps.
I used to AppGroups to make sure the state is shared between the two. ( I needed to store photos for later upload to a server)

ortonomy

Did you ever solve this?

Thank you for your help w/ this, @ortonomy .
I'm developing a basic sharing starter app & am running into the following compilation-time error:
Apple Mach-O Linker Error
"_OBJC_CLASS_$_RCTRootView", referenced from:
"_OBJC_CLASS_$_RCTBundleURLProvider", referenced from:
"_RCTRegisterModule", referenced from:
Linker command failed with exit code 1 (use -v to see invocation)

It appears that maybe the the share extension doesn't know where to look for React Native dependencies?
Have tried:

Adding $(inherited) in header & library search paths (no real change in functionality)
Adding the React Libraries to the ShareExtension dependencies (then, it can't find the newly-added dependencies)
Using Legacy Mode to compile (just shows a different version of the error above)

Any pointers on what I'm doing wrong? Again, thank you for all your help.
react-native-share-starter
Podfile
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'

target 'episogood' do
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'EpisogoodShare' do
    inherit! :complete
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'
      end
    end
  end
end

ShareviewController.h
#import <UIKit/UIKit.h>
#import <React/RCTBridgeModule.h>

@interface ShareViewController : UIViewController<RCTBridgeModule>
@end

ShareviewController.m
#import "ShareViewController.h"
#import <React/RCTRootView.h>
#import <React/RCTBundleURLProvider.h>
#import <MobileCoreServices/MobileCoreServices.h>

#define URL_IDENTIFIER (NSString *)kUTTypeURL

NSExtensionContext* extensionContext;

@implementation ShareViewController {
}

RCT_EXPORT_MODULE();

- (void) viewDidLoad {
  [super viewDidLoad];

  extensionContext = self.extensionContext; // global for later call to async promise

  // set up react native instance
  NSURL *jsCodeLocation;

  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
  RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL: jsCodeLocation
                                               moduleName: @"Share"
                                               initialProperties: nil
                                                   launchOptions: nil];

  UIViewController *rootViewController = [UIViewController alloc];
  rootViewController.view = rootView;
  [self addChildViewController: rootViewController];

  rootViewController.view.frame = self.view.bounds;
  rootViewController.view.translatesAutoresizingMaskIntoConstraints = false;
  [[self view] addSubview:rootViewController.view];
  NSArray* constraints = [NSArray arrayWithObjects:
                          [rootViewController.view.leftAnchor constraintEqualToAnchor: self.view.leftAnchor],
                          [rootViewController.view.rightAnchor constraintEqualToAnchor: self.view.rightAnchor],
                          [rootViewController.view.topAnchor constraintEqualToAnchor: self.view.topAnchor],
                          [rootViewController.view.bottomAnchor constraintEqualToAnchor: self.view.bottomAnchor], nil
                        ];
  [NSLayoutConstraint activateConstraints:constraints];

  [self didMoveToParentViewController: self];

}

RCT_REMAP_METHOD(getParameters,
                 resolver:(RCTPromiseResolveBlock)resolve
                 rejecter:(RCTPromiseRejectBlock)reject)
{
    [self extractData: extensionContext withCallback:^(NSDictionary* result, NSException* err) {
        if(err) {
            reject(@"error", err.description, nil);
        } else {
            resolve(result);
        }
    }];
}

- (void) extractData: (NSExtensionContext *)context withCallback:(void(^)(NSDictionary* result, NSException *exception))callback {
  @try {

    // get items shared
    NSExtensionItem *item = [context.inputItems firstObject];
    __block NSItemProvider *provider = item.attachments.firstObject;

    if([provider hasItemConformingToTypeIdentifier:URL_IDENTIFIER]) {
      [provider loadItemForTypeIdentifier:URL_IDENTIFIER options:nil completionHandler:^(id<NSSecureCoding> item, NSError *error) {
        NSURL *url = (NSURL *)item;
        NSDictionary *result = @{@"data": [url absoluteString], @"type": @"url"};
        if(callback) {
            callback(result, nil);
        }
      }];

      return;

    }

    if(callback) {
      callback(nil, [NSException exceptionWithName:@"Error" reason:@"couldn't find provider" userInfo:nil]);
    }
  }
  @catch (NSException *exception) {
  }
}

@end

Did you ever solve this?


Add Stellar education modal directly in Keybase app

Adds a popup with information about Stellar when a user clicks on one of the various "What is Stellar?" buttons through the app. (Previously we linked to https://keybase.io/what-is-stellar.) Note that the mockups originally included a couple of videos about Stellar, but since we don't have those yet, they aren't included.
Screenshot of the page on desktop:

And mobile:

Locations the "What is Stellar?" button appears:

Wallet List on desktop
Wallet Switcher on mobile
Clicking on a stellar address assertion on the profile page (desktop or mobile) or tracker (desktop only)

I also added storybook entry for this new page. (Links – note you'll need to be checked out on this branch and have the appropriate storybook server running: 🖥 , 📱)
I'm a little rusty on how we do routing (I mostly copied code from other components that were already routed), so I'd especially appreciate feedback on that.

Potential follow up ticket: we could probably remove the https://keybase.io/what-is-stellar URL from here.

Updated this component to use react-redux's useDispatch, made available by #17982. Since we don't need any props from the state for WhatIsStellarModal, I don't think we need to mock the state at all, but maybe @chrisnojima can confirm this?


Fix JWT deeplink login button

It must be appears to all users, not only for moderators.

also it is not always accessible because of popup

I think better have this button appear also in this popup (deeplink/webwallet) because i'm the host button is opening a login form which does not work anymore (we cant have jwt and password login work together)

Can you add it to the menu here

I think this is a duplicate of https://github.com/aeternity/jitsi-meet/issues/44


Timestampable trait not work

I'm using timestampable trait in my entity, but when I am going to persist, created_at is null and I get mysql error.
use LaravelDoctrine\Extensions\Timestamps\Timestamps;
/**
*

@ORM\Entity
@ORM\Table(name="user")
@ORM\HasLifecycleCallbacks
*/
class User implements Authenticatable, CanResetPassword
{
use \LaravelDoctrine\ORM\Auth\Authenticatable;
use \Illuminate\Auth\Passwords\CanResetPassword;
use Timestamps;

1048 Column 'created_at' cannot be null",

you must import Gedmo Timstampable annotation, not in a trait, but in entity. traits do not carry annotations to classes they are used.

Now I've put attributes with annotations in Entity, but the problem is the same:
/**
* @ORM\Column(name="created_at", type="datetime", nullable=false)
* @Gedmo\Timestampable(on="create")
* @var DateTime
*/
protected $createdAt;
/**
 * @ORM\Column(name="updated_at", type="datetime", nullable=false)
 * @Gedmo\Timestampable(on="update")
 * @var DateTime
 */
protected $updatedAt;

Column 'created_at' cannot be null

in that case look how to hook TimestampableListener to EventManager of your EntityManager and read documentation carefully

@christiancannata (I know it's late but) are you actually changing any field in the entity? because if you just load and entity call flush without any changes the update event wouldn't be called.


sonarr v4

not work because use mono exe

i just tried to update this by changing line 175 to:
sonarr_src_url="https://services.sonarr.tv/v1/download/main/latest?version=4&os=linux"
and line 378 to:
          app_exec="${app_opt_path}/$(title_case ${app_name}) -nobrowser"
however systemctl status sonarr
just shows that its "starting sonarr daemon" but when i try to run it manually
sudo su ./opt/Sonarr/Sonarr --nobrowser
i just get
bash: ./Sonarr: cannot execute binary file: Exec format error
PS running on raspberry pi 4 8gb

Updated script to support now support Sonarr v4, just download and run latest version of script.


Cannot delete a directory if it WAS a 'workspace deploy location'

Set an IFS directory to be the Workspace Deploy Location via the IFS Browser

Deploy to the directory

If there was no Project Explorere (no iproj.json in the directory) then you cannot delete the project while it is a deploy directory, but it can be deleted afterwards.
But in this case it is an i pojrect
Switch deploy to location to any other directory

Now try to delete the original directory

This delete fails

@SanjulaGanepola
Is there some kind of file watcher that the Project Explorer sets up that needs to be deactivated?

Context
Version

Code for IBM i version
2.4.0

Visual Studio Code version
1.83.1

Operating System
darwin_arm64

Active extensions
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.4.0
Db2 for IBM i (vscode-db2i): 0.5.1
ESLint (vscode-eslint): 2.4.2
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.15.0
Git (git): 1.0.0
Git Base (git-base): 1.0.0
Git Graph (git-graph): 1.30.0
Git Project Manager (git-project-manager): 1.8.2
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
GitLens — Git supercharged (gitlens): 14.4.1
IBM i Developer (ibmideveloper): 2.0.0
IBM i Notebooks (vscode-ibmi-notebooks): 0.0.6
IBM i Project Explorer (vscode-ibmi-projectexplorer): 1.2.4
JSON Language Features (json-language-features): 1.0.0
Live Share (vsliveshare): 1.0.5892
Merge Conflict (merge-conflict): 1.0.0
Microsoft Account (microsoft-authentication): 0.0.1
NPM support for VS Code (npm): 1.0.1
Node Debug Auto-attach (debug-auto-launch): 1.0.0
TODO Highlight (vscode-todo-highlight): 1.0.5
Test Adapter Converter (test-adapter-converter): 0.1.8
Test Explorer UI (vscode-test-explorer): 2.21.1
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0
undefined (vscode-sourceorbit): 1.1.0

Remote system

Setting
Value

IBM i OS
n/a

Tech Refresh
n/a

CCSID
65535

SQL
Disabled

Source dates
Disabled

Enabled features

/QOpenSys/pkgs/bin
/usr/bin
/QSYS.lib/ILEDITOR.lib
/QSYS.LIB
/QIBM/ProdData/IBMiDebugService/bin

bash
attr
GENCMDXML.PGM
QZDFMDB2.PGM
startDebugService.sh

chsh
iconv
GETNEWLIBL.PGM

git
setccsid

grep

ls

md5sum

sort

stat

tar

tn5250

Shell env
BUILDLIB=QGPL
CURLIB=QGPL
HOME=/home/reinhard/builds/ibmi-company_system
HOST=p9adt01.rch.stglabs.ibm.com
IBMIMAKE=/Build/Bob/IBMiMake
LIBLS=QTEMP QGPL TESTTOOLS
LOGIN=reinhard
LOGNAME=reinhard
MAIL=/var/spool/mail/reinhard
OBJLIB=BOBTOOLS
OLDPWD=/home/reinhard
PASE_SYSCALL_NOSIGILL=ALL:quotactl=EPERM:audit=0
PATH=/QOpenSys/pkgs/bin:/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
PWD=/home/reinhard/builds/ibmi-company_system
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=<IP_ADDRESS> 49832 22
SSH_CONNECTION=<IP_ADDRESS> 49832 <IP_ADDRESS> 22
TERM=xterm
TZ=<UTC>0
USER=reinhard
USERNAME=reinhard
_=/QOpenSys/pkgs/bin/env

Variants
{
  "american": "#@$",
  "local": "#@$"
}

Errors
[
  {
    "command": "system \"CRTLIB LIB(ILEDITOR) TEXT('Code for i temporary objects. May be cleared.')\"",
    "code": 255,
    "stderr": "CPF2111: Library ILEDITOR already exists.",
    "cwd": "/home/reinhard"
  },
  {
    "command": "ls -p /QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx",
    "code": 2,
    "stderr": "ls: cannot access '/QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx': No such file or directory",
    "cwd": "/home/reinhard"
  },
  {
    "command": "rm -rf /home/reinhard/builds/ibmi-company_system",
    "code": 1,
    "stderr": "rm: cannot remove '/home/reinhard/builds/ibmi-company_system': Device busy",
    "cwd": "/home/reinhard/builds/ibmi-company_system"
  }
]

@edmundreinhardt There shouldn't be any file watcher that needs to be deactivated. I tried out what you outlined and it looks like it can even be reproduced in just Code4i by simply doing the following:

Create a new directory.
Use Set Deploy Workspace Location on this new directory in the IFS Browser.
Deploy the project to this location.
Try to delete the directory using the IFS Browser and you will get the error "Device busy".

When testing, I did notice that this only happens when there is a .bashrc file. When I didn't have one, it would give the error: "Cannot remove the current directory".
My .bashrc content:

export PATH="/QOpenSys/pkgs/bin:${PATH}"

Hey guys, I looked at the code in Code for i and rerproduced the issue as well.
However, it's not related to .bashrc, in my opinion. Why the deletion fails is simple: when deploying, the deploy location becomes the new current directory then the deployment commands and run. After that, trying to delete the deployment directory fails because you're basically trying to cut the branch you're seating on 😅
When running a command, we can see the current directory on the left side:

I'll make a note to handle this case in Code for i. In the case the user deletes the current deploy location, we'll make ~ the new current directory.

Yes, Seb, I noticed that this was reproducible in Code 4 i.  But I could understand at some level, that the directory was still in use.  The unique issue to Project Explorer is that even after changing the deploy directory, the old directory cannot be deleted.

@edmundreinhardt did you try do deploy again after changing the deploy dir and before trying to delete the old one?

Yes, you are right.  I will close this issue here, since this is a Code 4 i issue
@sebjulliand should I open defect in code 4 i  or do you already have something there?

Yes, you are right. I will close this issue here, since this is a Code 4 i issue @sebjulliand should I open defect in code 4 i or do you already have something there?

Please do, I don't have anything there yet. You can assign it to me right away.


[1.21] Framed Compacting Drawer textures gone

DO NOT REPORT AN ISSUE IF YOU HAVEN'T TESTED THE ISSUE WITH THE LATEST VERSION IN CURSEFORGE
Functional Storage Version: 1.21.0-1.3.2
Titanium Version: 4.0.12
Crashlog If Applicable (Upload to pastebin/gist):
After teleporting to another dimension returned to my base to find the texture gone

Does breaking them and placing them again fixes it?

Yes it does, by breaking 1 drawer, all the others connected to it will fix aswell
If I go to another dimension and back to the base will also fix it.

ah right, I have a chunk loader in the chunk where the drawers are, not sure if that will make any different but though I should mention it

yep, not sure if it is happening now though, been a while since I used them

Will close this, and reopen in case it happens again


ns_uri null values in authority mapper configs?

Check it out...

Fixed in https://github.com/collectionspace/cspace-config-untangler/pull/60


Add OpenTelemetry support

It would be good to have OpenTelemetry support in the canary.

Closed via #179


added compose file example in accordion

What's changed

added the voting app sample Compose file (docker-stack.yml) to the Compose file version 3 reference

the goal is to help clarify the structure and format of Compose files, per the referenced PR's and issues below

fyi, markdownify didn't work here (it worked for the code block with the exception that the backticks showed), so I used the HTML tags recommended on the Bootstrap.js site

Related issues and PR's
Issue #1250, PR #2322
Reviewers, fyi
@sbrattla @shin- @dnephin @ManoMarks @jsouth @johndmulhausen
Signed-off-by: Victoria Bialas<EMAIL_ADDRESS>

LGTM

Is there no way to include this sample from the file? Duplicating the same feels like it will be extra work to maintain.

@dnephin Hi, I could link them out to file on GitHub, but I just felt the file would be more useful for this purpose if it were inline. I can change this if you prefer.


Deploy Data workflow should fire via manual trigger, not on every PR ; should also not be firing on non-data-pipeline changes

Describe the bug
Currently our Deploy Data workflow fires on all PRs. But - it takes an hour to run. We should move to use workflow_dispatch instead , and/or trigger via schedule.
Also, as a bonus bug! It's firing on changes to directories that are not data-pipeline. This should not be the case.
To Reproduce
Steps to reproduce the behavior:

Create a PR , and/or create a PR that includes changes not made to the data directory
Notice the Deploy Data workflow is running, takes an hour, and prohibits merging for an hour

Expected behavior
We should move to a manual trigger so we don't have to wait

The firing bug is addressed with #491


I followed this tutorial and got tracing setup

I followed this tutorial and got tracing setup but it does not show in Jaeger when I searched it under services. It only shows jaeger-query and selenium-route didn't display when I searched under services. What can I do? Very urgent as we need this tracing.

Hello! Depending on the Selenium version you are using, the OpenTelemetry java options for exporting might differ. The newer versions have tried to keep with the latest release of OpenTelemetry. OpenTelemetry has made many breaking changes till their major release.
I would recommend please try following the instructions here based on the Selenium version you are using.


Alphabetized/Searchable Schema

Is your feature request related to a problem? Please describe.
The schema docs cannot be searched or filtered. In a large code base with hundreds of schema you have to scroll to find the right one.
Describe the solution you'd like
An elastic search would be perfect for finding the exact doc you need quickly
Describe alternatives you've considered
Alphabetizing the schema somehow would at least make searching them far easier, and possibly be cheaper/faster to get over the line. Not as good of a feature though.

Are you referring to GraphQL or Specs?

Are you referring to GraphQL or Specs?

GraphQL. I know you can command + click but I would like to be able to use a search bar to find the documentation for a specific query/mutation in the bar on the right.

GraphQL. I know you can command + click but I would like to be able to use a search bar to find the documentation for a specific query/mutation in the bar on the right.

This seems to be a duplicate so I will close this issue in favor of #2720, feel free to continue there if you have any specific requirements of search. Looks like the alternate request for alphabetizing the schema was also resolved with #2732, which would be a part of the upcoming release. Thank you for requesting! 🙂

This seems to be a duplicate so I will close this issue in favor of #2720, feel free to continue there if you have any specific requirements of search. Looks like the alternate request for alphabetizing the schema was also resolved with #2732, which would be a part of the upcoming release. Thank you for requesting! 🙂