Model heuristics added

Describe your changes
This is the 1st version of the heuristics issue (#114)
The code
In order to keep it simple, consistent, and easy to maintain I separated the code

We expose 2 methods evaluate_model and compare_models.
We use ModelHeuristics as a base class for different "model heuristics" we want to implement, i.e: ModelEvaluator and ModelComparer.
ModelEvaluator - evaluates specific parts of a given model using its methods
ModelComparer - compares "model a" with "model b"

Examples
Report : Evaluation
Report: Comparison
I also added the HTML reports (looking better than in our docs)

:books: Documentation preview :books:: https://sklearn-evaluation--232.org.readthedocs.build/en/232/

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

97 of 109 (88.99%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.04%) to 94.166%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/sklearn_evaluation/models.py
97
109
88.99%

Totals

Change from base Build<PHONE_NUMBER>:
-0.04%

Covered Lines:
2760

Relevant Lines:
2931

💛  - Coveralls

@idomic @edublancas please share your thoughts on this

@idomic

both are evaluate_model?

Oh it's a typo. should be evaluate_model and compare_models. fixed it.

It consists of different keys such as: "accuracy", "balance", "auc" etc...

I assume in that case it's only classification?

In this example - yes
Since evaluation_state is a dictionary we can set different keys as "evaluation parameters" and use them when generating a report.
e.g
evaluation_state["cosine_similarity"]

Awesome! This is right on track.
My only suggestion is to embed (if possible) the generated report in the user guide.
I think having this will work:
from IPython.display import HTML

HTML(filename="report.html")

if not, we might wanna try with IPython.display.IFrame

@idomic @edublancas please note that I changed the description in this PR, added docs examples, and attached example files.
I think we need to:

Add relevant references to our blog posts (I didn't find them)
Maybe add more stats to make the reports even more helpful (it's easy)
Go over the content and see if it makes sense
@idomic can you please rerun your example and see if it works? I wasn't able to reproduce it.
See if examples are ok (maybe a different dataset with better examples?)

Some feedback:
i see that you're hiding the output when calling  evaluate_model, and compare_models since those calls print all the generated plots. ideally, call to these functions should not print the plots so we should suppress it internally. let me take a quick look at this, I remember doing something like this before.

we just merged plot.PrecisionRecall, please rebase and include the combined plot in the report (plot1 + plot2)

Since evaluate_model, and compare_models and returning a Report object. In the tutorials, you can change this:
from IPython.display import HTML
HTML(report._repr_html_())

for this:
report

Jupyter will detect that Report has a _repr_html_ method and use it automatically.

Something's broken when displaying the report (I guess that the output HTML string is malformed):

Model A compute time is 0.012612581253051758

what is this compute time? is it time to produce the predictions? if so, it'd be better to say so. cause compute time is ambiguous (can be confused with time to train the model)

Add relevant references to our blog posts (I didn't find them):

we don't have them. opened https://github.com/ploomber/sklearn-evaluation/issues/257 - feel free to comment if we have anything else missing

Maybe add more stats to make the reports even more helpful (it's easy)

what stats are you thinking of?

i see that you're hiding the output when calling evaluate_model, and compare_models since those calls print all the generated plots. ideally, call to these functions should not print the plots so we should suppress it internally.

found how to hide the plots:
import matplotlib.pyplot as plt
from contextlib import contextmanager

@contextmanager
def no_display_plots():
    plt.ioff()

    try:
        yield
    finally:
        plt.ion()

def plot():
    with no_display_plots():
        # plots inside the context manager wont be displayed
        _, ax = plt.subplots()
        ax.plot([1,1,1])
        # figures must be closed
        plt.close(ax.figure)

        # or to close all figures
        plt.close("all")

    return ax

@edublancas this is ready for a review

@edublancas I added report-evaluation and report-comparison to the API section but it only shows the plots without the HTML. any suggestions?

I added report-evaluation and report-comparison to the API section but it only shows the plots without the HTML. any suggestions?

they reports won't display, this is a limitation of the directive we're using to document the examples, but that's fine. Let's just link from the docstring to the tutorial to ensure people can see the sample reports.

is this ready for review? I saw you requested a review but noticed that you didn't reply to some of my comments from the  latest review, so I'm unsure if you addressed the or if they're still pending.

@edublancas yes. for some reason it didn't catch the resolve. I added more tests.
I think besides the code, please check the relevance of the reports. If something is missing or the calculation is inaccurate this can be easily fixed.

hey @neelasha23: can you take a look? I already reviewed the code but we'd like some user testing:

I think besides the code, please check the relevance of the reports. If something is missing or the calculation is inaccurate this can be easily fixed.

essentially, generate the reports with different models, input datasets and see if they make sense

There are some issues in the Precision Recall curve:
Line 254 we need to add check for str type :
        if n_classes > 2:
            if label is not None:
                if isinstance(label, str):
                    label = [label]
                label = ["Micro-average"] + label

But even after adding this I get this error:
ValueError: Found input variables with inconsistent numbers of samples: [226280, 150640]
If you need help solving this issue, send us a message: https://ploomber.io/community

PFB the code
model heuristics.txt

Is there a way to ignore a plot during report generation?
Can we add debug logs here?

For the same dataset shared above the evaluate report looks like this:

There isn't much insights in the AUC value , probably because this is a multi-class classification? Is this expected?
Do we mean dataset is balanced instead of model is balanced? A short explanation here would be helpful

Facing similar issues with the mushrooms dataset (https://www.kaggle.com/datasets/uciml/mushroom-classification)
Code:
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
import seaborn as sns
data = pd.read_csv("/Users/neelashasen/Downloads/mushrooms.csv")
from sklearn.preprocessing import LabelEncoder
labelencoder=LabelEncoder()
for col in data.columns:
    data[col] = labelencoder.fit_transform(data[col])
X = data.iloc[:,1:23]
y = data.iloc[:, 0]
from sklearn.preprocessing import StandardScaler
scaler = StandardScaler()
X=scaler.fit_transform(X)
from sklearn.model_selection import train_test_split
X_train, X_test, y_train, y_test = train_test_split(X,y,test_size=0.2,random_state=4)
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import cross_val_score
from sklearn import metrics

model_LR= LogisticRegression()
model_LR.fit(X_train,y_train)
y_prob = model_LR.predict_proba(X_test)[:,1]
y_pred = np.where(y_prob > 0.5, 1, 0)
model_LR.score(X_test, y_pred)
y_score = model_LR.predict_proba(X_test)
from sklearn_evaluation.models import evaluate_model

report = evaluate_model(model_LR, y_test, y_pred, y_score=y_score)

@neelasha23

Is there a way to ignore a plot during report generation?
Can we add debug logs here?

I added an error and stack trace to the report. Also, if something fails - it now captures any exception and logs it to the report.

There isn't much insights in the AUC value , probably because this is a multi-class classification? Is this expected?
Do we mean dataset is balanced instead of model is balanced? A short explanation here would be helpful
I think in General Stats we can also include some common metrics like Precision, Recall etc
Title of the report is Model evaluation - Pipeline .. can users pass a parameter to change this name?
Can we add some insights as to which classes performed the best and which classes performed the worst?

Yes. If everything is OK I didn't show the AUC. changed it.
I'm not sure which term is correct. Please let me know which one you think is more suitable here.
Added Precision and recall plot.
We can now change the title by passing evaluate_model(model, ..., report_title = "custom title" ) or compare_models(..., report_title = "custom title" )
Added top AUC, worst AUC and number of classes.

Line 254 we need to add check for str type :

@edublancas Do you think we should change it here or open a new issue?

On second thoughts, I think this change is not needed. Because when n_classes > 2 label should be a list.
We need to check why the evaluator is passing a string here as label for multiclass classification.
@yafimvo

Line 254 we need to add check for str type :

@edublancas Do you think we should change it here or open a new issue?

I think as a role of thumb if it's not blocking and the pr is open for more than 2 weeks, yes we should create a new issue and a PR just for this small fix.

I'm not sure which term is correct. Please let me know which one you think is more suitable here.

Please change to dataset is balanced.
@yafimvo

fixes the docs in master, please rebase


Err msg on initial DeployHub sign in attempt: Unsupported major.minor version 52.0

Email from customer:
Recently install in my computer DeployHub 8
My computer has:
Windows 7 64bit
PostgreSQL 9.3
Java jdk1.8.0_144
Java jre1.8.0_144
Posgres psqlodbc_09_03_0400
When I run:
localhost:8080/dmadminweb/Home in any of the web browser I got the folling error message:
HTTP 500 - dmadmin/Home : Unsupported major.minor version 52.0
Apache Tomcat/7.0.54
What do I have to do to correct it?
Thanks in advance,
Ricardo Lorenzi

My response to Ricardo via email:
Ricardo,
I have entered bug number #11 into our github bug tracking system, which you can respond to by going to:
https://github.com/OpenMake-Software/DeployHub/issues
Bug #11 is in the list, and you can view and respond to us through this bug entry.
In the meantime, have you reviewed the installation guide for Windows? It can be found at:
https://www.openmakesoftware.com/helpRE75/NetHelp/index.html#!Documents/deployhubinstallationguideforwindows.htm
Thanks,
Kirk Righter
OpenMake Software

52.0 is Java 8 so the only thing I can think of is that you have Java 7 or earlier installed somewhere and that is being picked up on the path before Java 8. Could you open a DOS prompt and enter:
java -version
If that reports anything earlier than 1.8 then you may need to fiddle with the path.

Definitely, an older java version being used to run the tomcat server.  Whats JAVA_HOME set to?

Sent email to customer, who's having trouble signing into GutHub:
Ricardo,
Go here: https://github.com/OpenMake-Software/DeployHub/issues/11
You should be made to sign in using your id. Then go to the Subscribe button on the right and click it. This should allow you to read and add posts to this issue. There are updates with suggestions for solving your problem.
Thanks,
Kirk

Definitely I had some Java mixed versions, so I uninstalled all and reinstalled de last Java version (jdk1.8.0_144)
I also unistalled all Tomcar that I had and Install the new one (apache-tomcat-8.5.9)
I don't the error message that I had before but I have a new one
HTTP 404 - /dmadminweb/Home
Can you help me with this?

Hi Lorenzir.
Tomcat is installed with DeployHub (the only pre-requisites are Postgres and Java) so the chances are you're looking at your new Tomcat instance and not the DeployHub one. 404 is "page not found" so it looks like you're talking to the wrong Tomcat instance. I would stop the Tomcat version you've installed and restart the Deploy Hub web admin service (probably called Release Engineer Admin).
Cheers,
Phil.

Thanks, now It's working

Customer responded:
Definitely I had some Java mixed versions, so I uninstalled all and reinstalled de last Java version (jdk1.8.0_144)
I also unistalled all Tomcar that I had and Install the new one (apache-tomcat-8.5.9)
I don't the error message that I had before but I have a new one
HTTP 404 - /dmadminweb/Home
Can you help me with this?

Phil's response:
Hi Lorenzir.
Tomcat is installed with DeployHub (the only pre-requisites are Postgres and Java) so the chances are you're looking at your new Tomcat instance and not the DeployHub one. 404 is "page not found" so it looks like you're talking to the wrong Tomcat instance. I would stop the Tomcat version you've installed and restart the Deploy Hub web admin service (probably called Release Engineer Admin).
Cheers,
Phil.

Customer says it's working now, closing this issue.

@rightker we need to update the install docs to specify only JDK 1.8 64-bit is required.


Excessive use of internal and lack of virtual making modification near-impossible

RoslynPad is great for what it does, but due to the use of the internal keyword for almost every class in the library, overriding or customizing anything becomes quite difficult. Basically users are at the mercy of the developer to make exactly what they need changed or fixed an option or feature. There is no ability to fix it yourself. virtual methods is another instance that doesn't nearly have enough use. I will agree that the existing overridable methods are very helpful already but there are many more that could be implemented.
Of course if I could, I would just use the source for the library and modify that. But due to being constrained to VS 2015, it becomes impossible to build the library even if you remove all uses of C#7. Others may also not be lucky enough to be using VS 2017.
This is only a minor gripe as at the moment as I've pretty much got the editor to the point I want it to be at, but that was mostly through modifying AvalonEdit's source and referencing the project instead of the Nuget package. The other instance would be completely disabling brace completion through reflection, not just due to #121 , but also due to the coding style used for the brace completion forcing the opening brace to be on a new line.

Can you give concrete examples of internal types/virtual members you needed? Remember that I'm just one guy doing this on his free time… :) and I didn't design RP to be reusable from the get-go. The NuGet packages are relatively new.
Regarding C# 7 (or 7.2 to be precise), I'm afraid that's not going to change. You could compile in the command line. Or alternatively just download the VS community edition and use it just for RP. I think there's also an option to consume the compiler using NuGet but I've never tried it.
Another option is the build trick I use to access Roslyn's internals: https://github.com/aelij/IgnoresAccessChecksToGenerator

Sure, here are a few examples that I've encountered specifically.

RoslynCodeEditorCompletionProvider.Warmup() is internal which is a minor setback when trying to create your own RoslynCodeEditor from CodeEditor.
A lot (or maybe even all) extension methods seem to be internal which makes copying source code to make custom classes a lot more difficult.
Basically everything in the AutoCompletion and BraceMatching namespace is internal which entirely prevented making a new brace completion method.

I should also note that some things seemed to be missing from outside RoslynPad like some Microsoft.CodeAnyalysis classes like IFormattingRule and the Formatting.Rules namespace in general. Not sure if they are only available in newer framework/standard versions or something else. But there's nothing that can be done about this so it's no big deal, just a little strange.
And sorry if I came off as nitpicky, I really do appreciate this library and you're a pretty awesome dev to be this on the ball for every issue in the GitHub repo, personal question or otherwise.
As for for the Nuget packages being new, well that explains things a bit so this issue certainly isn't something that would have been important before that.
Also that IgnoresAccessChecksToGenerator sounds really helpful again. Will definitely check that out for many different situations.


Human gene products inflated

17510 from UniProt (which seems to be all annotated human gene products)
8591 as HGNC (PANther annotation), which are exact duplicates form PAnther
so for example MRPL39
http://amigo2.berkeleybop.org/amigo/search/bioentity?q=MRPL39
Please, please can this be fixed. We can't use human annotation for any analysis whilst this issue persists.

See my comment here https://github.com/geneontology/helpdesk/issues/99#issuecomment-371574707 for an explanation of why this is persists

Dupe of: https://github.com/geneontology/helpdesk/issues/99


the preprocessed data does’nt has attribute [pos_normals] or [neg_normals]

I tried to set [use_precomputed]=false  but error still happened cause of ：
if sdf_samples_with_normals is None:
    if use_precomputed_init:
        return torch.from_numpy(np.load(initialization_file))
    else:
        npz = np.load(sdf_filename)
        pos_tensor = deep_sdf.data.remove_nans(torch.from_numpy(np.concatenate([npz["pos"], npz["pos_normals"]], axis=1))).numpy()
        neg_tensor = deep_sdf.data.remove_nans(torch.from_numpy(np.concatenate([npz["neg"], npz["neg_normals"]], axis=1))).numpy()

#----------

import numpy as np
cat=np.load('/user-data/patchnets-master/code/data/SdfSamples/ShapeNetV2/02691156/1a29042e20ab6f005e9e2656aff7dd5b.npz')
cat.files
['pos', 'neg']

Hi,
are you using the version of src/PreprocessMesh.cpp that is included in
this repo or the one from DeepSDF? This repo contains a modified version
that also writes out normals:
https://github.com/edgar-tr/patchnets/blob/1d20bfd1ec74f8c6687939c6092642685fdeee94/src/PreprocessMesh.cpp#L258
On the other hand, DeepSDF only writes out pos and neg (as in your case,
apparently):
https://github.com/facebookresearch/DeepSDF/blob/main/src/PreprocessMesh.cpp#L220
It is best to first install DeepSDF and to then overwrite all files in
that installation with the files included in this (PatchNets) repo.

Thank you so much! Now I can successfully generate correct data .
However, I noticed that some npz files have suffix of  "rejected" because of :
if (wrong_ratio > rejection_criteria_obs || bad_tri_ratio > rejection_criteria_tri) {
std::cout << "mesh rejected" << std::endl;
npyFileName = npyFileName + "____rejected.npz";
//return 1;
}
(in ProprocessMesh.cpp )
It will not happen when using cpp files included in DeepSDF.
I'm confused about it and I want to know whether the npz files were generated correctly.
In addition ，if there is no errors ，should I use these rejected.npz files to train or test  ， or delete them？

I believe I added that merely as a marker for debugging (I did not
really clean up the code before releasing it) but use them as normal
shapes everywhere. The original DeepSDF code similarly does not do
anything with the information that some point clouds are not perfectly
suitable:
https://github.com/facebookresearch/DeepSDF/blob/main/src/PreprocessMesh.cpp#L509
In the folder that I can still find, there appear to be only five shapes
in the 13 Shapenet categories that we use that are marked as "rejected".
So either way it won't make any noticeable difference.

Thanks a lot!  Up till now I have generated 1110 npz files used sv2_lamps_json and there is 6 rejected mesh. And I generated a part of sofa meshes (about 643  with 13 were rejected).I think it will not make a big difference?
Besides ,I met a problem when I tried to train with some specific npz files(not rejected mesh) ,There is a 【 RuntimeWarning: invalid value encountered in arcsin 】because of ：
def _get_euler_angles_from_rotation_matrix(rotation_matrix):
if np.abs(rotation_matrix[2,0]) != 1.:
beta = -np.arcsin(rotation_matrix[2,0])
cosBeta = np.cos(beta)
return np.array([np.arctan2(rotation_matrix[2,1], rotation_matrix[2,2]), beta, np.arctan2(rotation_matrix[1,0], rotation_matrix[0,0])])
I guess it is because the value of rotation_matrix[2,0] is outside the range of [- 1, 1] and it cause an error:
def remove_nans(tensor):
tensor_nan = torch.isnan(tensor[:, 3])
tensor_nan_fixed = torch.isnan(tensor).any(-1)
if (tensor_nan != tensor_nan_fixed).any():
import ipdb; ipdb.set_trace()
return tensor[~tensor_nan, :]
The program paused because 【tensor_nan != tensor_nan_fixed】( for Ipython Debugger ). How can I fix it?

I'm not following. The _get_euler_angles_from_rotation_matrix can return
NaNs, yes, but they are removed immediately afterwards:
https://github.com/edgar-tr/patchnets/blob/1d20bfd1ec74f8c6687939c6092642685fdeee94/code/train_deep_sdf.py#L374
remove_nans gets only called with input "tensor"s that contain positions
or normals, but not with rotation matrices:
https://github.com/edgar-tr/patchnets/blob/1d20bfd1ec74f8c6687939c6092642685fdeee94/code/deep_sdf/data.py#L58
You could replace the ipdb line with tensor_nan =
torch.logical_or(tensor_nan, tensor_nan_fixed), I suppose. I don't
remember this part well.

Thank you so much! I  replaced ipdb line and trained model successfully.  I trained about 900 ShpenetV2obj with 300 epoch , but after reconstructing and evaluating，the result was not so good,  （The average chamfer distance is as more than 1.0）
I noticed that while reconstructing ,the code does not use specs and sdffile:
(in reconstruct.py)
(Referrence:)
err, latent = reconstruct(
decoder,
int(args.iterations),
mixture_latent_size,
data_sdf,
0.01,  # [emp_mean,emp_var],
0.1,
num_samples=8000,
lr=5e-3,
l2reg=True,
)
(Define:)
def reconstruct(
...,
specs=None,
sdf_filename=None,):
I am not sure whether it will cause error.

For fitting to test data, see
https://github.com/edgar-tr/patchnets#evaluation

Thank you so much!  I managed to convert latent codes into meshes by using  functioon visualize_parts_individually (patches),which generated .obj followed train_split.json.
But when I tried to run useful_scripts.py to Evaluation, an error occured ：
error:
......，
File "useful_scripts.py", line 105, in visualize_mixture
_, latent_code = sdf_to_latent(sdf, full_loss=True, latent_init=latent_code, num_samples=3072, num_iterations=1000, sdf_filename=sdf_filename, lr=0.001, adjust_lr_every=200, decrease_lr_by=2)
UnboundLocalError: local variable 'latent_code' referenced before assignment
The function evaluate_patch_network_metrics() includs  visualize_mixture()（ # full object）, in visualize_mixture：(Line 105)
train_latent_codes = torch.load(results_folder + "LatentCodes/" + checkpoint + ".pth")
for i, mesh in enumerate(mesh_files):
if mesh in train_split:
train_id = train_split.index(mesh)
latent_code = train_latent_codes["latent_codes"][train_id,0,:].unsqueeze(0).clone().cuda()
else:
sdf_filename = data_source + mesh + ".npz"
sdf = np.load(sdf_filename)
sdf = (torch.from_numpy(sdf["pos"]), torch.from_numpy(sdf["neg"]))
_, latent_code = sdf_to_latent(sdf, full_loss=True, latent_init=latent_code, num_samples=3072, num_iterations=1000, sdf_filename=sdf_filename, lr=0.001, adjust_lr_every=200, decrease_lr_by=2)
It seems that the variable [latent_code] does not declared at (latent_init=latent_code) in the else branch. How can I fix it?

There should never be a case where the code lands in the else branch. If
you follow the readme for test-set reconstruction (see my earlier
comment), the test set will technically be treated as a training set by
the code (which is why it's important to keep the network weights fixed,
for example). Therefore, the if branch should always get chosen by the
code.

thanks a lot ！


feat: Android Twilio SDK 5.4.2

Ported Twilio quickstart changes up to this point https://github.com/twilio/voice-quickstart-android/commit/e3db03fac386ae18d3790a52dbd423ead7234ab3

[x] notification for incoming call when the app is in the background

[x] implement Android v5

[x] test making a call

[x] test incoming call, when app in foreground

[x] test incoming call, when app in background

[x] test incoming call, when app is closed

[x] test after a call invite is cancelled, opening the JS app doesn't trigger the incoming call screen

[x] cleanup XML resources

[x] incoming notifications when the device is locked

[x] correctly cleanup a CALL_INVITE after answering or missed, currently the second time the app is stuck with this log:

[x] Error when receiving a call and the app is closed

2020-11-15 12:53:28.746 32167-32167/? W/GCM: broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10000000 pkg=com.hoxfon.HoxFon.DEV.debug (has extras) }

[x] Ensure that issue #77 is resolved: In call dialpad not accessible when the call is answered from the lock screen

[x] add intent to call in progress notification to bring the app to the foreground

[x] write migration instruction in the README

Known issues:

[x] Call invite heads-up notification are not auto cancelled. This issue happens when a call is received and the screen is locked or the screen in unlocked, but the app is in the background. The heads-up notification service is started. If the user taps on the notification full screen content (not reject nor answer button), and then accepts the call from JS, at the end of the call the heads-up notification won't be removed, because there is no push notification for end call, just for call invite cancelled by the caller. I don't know how to solve this issue, because endForeground() can only be called by the service and all the user interactions from JS end are handled by the VoiceModule. At the same time full screen content is needed to show the JS incoming call screen when the phone is locked, therefore it can't be removed.

Reported bugs:

[x] getLaunchOptions() crashes upon the first app launch: https://github.com/hoxfon/react-native-twilio-programmable-voice/pull/164#issuecomment-757965249 (not able to reproduce)
[ ] check microphone permissions: https://github.com/hoxfon/react-native-twilio-programmable-voice/pull/164#issuecomment-753997031
[x] check fullscreen intent https://github.com/hoxfon/react-native-twilio-programmable-voice/pull/164#issuecomment-753997031
[x] If I invoke call screen on app kill with device locked then accept call using TwilioVoice.accept() still the notification is showing after the call connect - Android version (8 , 9, 10 , 11): https://github.com/hoxfon/react-native-twilio-programmable-voice/pull/164#issuecomment-753994599

@fabriziomoscon is there any reason why you are upgrading to 5.0.1 and not to 5.6.0? I'm asking since #39 depends on Android SDK being 5.3.0 or newer.

@fmonsalvo I am going through all commits here: https://github.com/twilio/voice-quickstart-android/commits one by one and port them

Perfect, just wanted to know the rationale. Thanks for the hard work!

@fabriziomoscon Hi. I have updated the Android Twilio SDK 5.0.2 code from this branch (458b0d4) and still facing same issue for incoming call.

@Samsritha1596 please refer to the above checklist to see the completion stage of this PR. Currently test incoming call, when app is closed is unchecked. Note that this use case is one of the known issue with the current master branch, which PR aims to solve.

@Samsritha1596 please try to use this commit: 88f4f7301aebc36c89c07ba85decd5b7b6ee0a1c and let me know if you can receive calls when the app is killed.

@fabriziomoscon Incoming call is not receiving when app is killed and also no events were triggered even when the app is in foreground , background and killed
Here is the version details:
"react-native": "0.61.5",
"react-native-twilio-programmable-voice": "^4.3.0",
"react-native-push-notification": "^6.1.3",
Please find the attached screenshot for app is killed

@fabriziomoscon Incoming call is not receiving when app is killed and also no events were triggered even when the app is in foreground , background and killed
Here is the version details:
"react-native": "0.61.5",
"react-native-twilio-programmable-voice": "^4.3.0",
"react-native-push-notification": "^6.1.3",
Please find the attached screenshot for app is killed

@fabriziomoscon Any update ?

You are not using this PR branch
"react-native-twilio-programmable-voice": "^4.3.0"

Please use:
"react-native-twilio-programmable-voice": "https://github.com/hoxfon/react-native-twilio-programmable-voice#feat/twilio-android-sdk-5",

@fabriziomoscon Receives heads-up notification when app is killed and background and does not trigger any event

@Samsritha1596

Receives heads-up notification when app is killed and background

This is the correct behaviour

without ringing

I don't know if the limitation for background services in Android 10 allow to ring, because they rely on the sound the user sets for notifications

does not trigger any event

This is right, because the JS app is not started, it can't deliver any event. Only tapping on ACCEPT will start the app and deliver the event to JS

@fabriziomoscon Behaves the same way after adding USE_FULL_SCREEN_INTENT

@Samsritha1596
Please retry now, note that I pushed forced new commits.

@fabriziomoscon Screen does nit invoke automatically when device is locked

@fabriziomoscon Screen does not invoke automatically when device is locked

I found an issue with receiving call in the background when the app is GONE (appImportance 1000). It seems that on my device (OnePlus 6), an activity is started on background whilst the device is locked. Whereas is not starting when the device is not locked.
19:39:24.417 18688-18769/<MY_APP> D/RNTwilioVoice: Bundle data: {twi_account_sid=xxx, twi_to=client:xxx, twi_bridge_token=xxx, twi_message_type=twilio.voice.call, twi_call_sid=xxx, twi_message_id=xxx, twi_from=xxx}
19:39:24.731 18688-18688/<MY_APP> D/RNTwilioVoice: context: null. appImportance = 1000
19:39:24.731 18688-18688/<MY_APP> D/RNTwilioVoice: Background
19:39:24.752 18688-18688/<MY_APP> D/RNTwilioVoice: onStartCommand() intent: Intent { act=ACTION_INCOMING_CALL cmp=<MY_APP>/com.hoxfon.react.RNTwilioVoice.IncomingCallNotificationService (has extras) }, flags: 0
19:39:24.753 18688-18688/<MY_APP> D/RNTwilioVoice: setCallInProgressNotification()
19:39:24.753 18688-18688/<MY_APP> I/RNTwilioVoice: app is NOT visible.
19:39:24.818 18688-18688/<MY_APP> D/RNTwilioVoice: sendCallInviteToActivity(). Android SDK: 29 app visible: false
19:39:24.885 18688-18688/<MY_APP> D/RNTwilioVoice: sendCallInviteToActivity(). DO NOTHING
19:39:24.939 1322-5062/? D/OemSceneCallBlock: isCallBlockedWithUidIntent { act=com.hoxfon.react.RNTwilioVoice.ACTION_INCOMING_CALL flg=0x4000000 cmp=<MY_APP>/com.hoxfon.MainActivity (has extras) }, ResolveInfo{1c0c12d <MY_APP>/com.hoxfon.MainActivity m=0x0}, false
19:39:24.940 1322-5062/? I/ActivityTaskManager: START u0 {act=com.hoxfon.react.RNTwilioVoice.ACTION_INCOMING_CALL flg=0x4000000 cmp=<MY_APP>/com.hoxfon.MainActivity (has extras)} from uid 10469 pid -1
19:39:24.941 1322-5062/? W/ActivityTaskManager: startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { act=com.hoxfon.react.RNTwilioVoice.ACTION_INCOMING_CALL flg=0x4000000 cmp=<MY_APP>/com.hoxfon.MainActivity (has extras) }
19:39:29.619 18688-18883/<MY_APP> D/RNTwilioVoice: initWithAccessToken()
19:39:29.620 18688-18883/<MY_APP> I/RNTwilioVoice: Registering with FCM

Could anybody try this scenario and verify whether this is a device specific bug?

I found an issue with receiving call in the background when the app is GONE (appImportance 1000). It seems that on my device (OnePlus 6), an activity is started on background whilst the device is locked. Whereas is not starting when the device is not locked.
19:39:24.417 18688-18769/<MY_APP> D/RNTwilioVoice: Bundle data: {twi_account_sid=xxx, twi_to=client:xxx, twi_bridge_token=xxx, twi_message_type=twilio.voice.call, twi_call_sid=xxx, twi_message_id=xxx, twi_from=xxx}
19:39:24.731 18688-18688/<MY_APP> D/RNTwilioVoice: context: null. appImportance = 1000
19:39:24.731 18688-18688/<MY_APP> D/RNTwilioVoice: Background
19:39:24.752 18688-18688/<MY_APP> D/RNTwilioVoice: onStartCommand() intent: Intent { act=ACTION_INCOMING_CALL cmp=<MY_APP>/com.hoxfon.react.RNTwilioVoice.IncomingCallNotificationService (has extras) }, flags: 0
19:39:24.753 18688-18688/<MY_APP> D/RNTwilioVoice: setCallInProgressNotification()
19:39:24.753 18688-18688/<MY_APP> I/RNTwilioVoice: app is NOT visible.
19:39:24.818 18688-18688/<MY_APP> D/RNTwilioVoice: sendCallInviteToActivity(). Android SDK: 29 app visible: false
19:39:24.885 18688-18688/<MY_APP> D/RNTwilioVoice: sendCallInviteToActivity(). DO NOTHING
19:39:24.939 1322-5062/? D/OemSceneCallBlock: isCallBlockedWithUidIntent { act=com.hoxfon.react.RNTwilioVoice.ACTION_INCOMING_CALL flg=0x4000000 cmp=<MY_APP>/com.hoxfon.MainActivity (has extras) }, ResolveInfo{1c0c12d <MY_APP>/com.hoxfon.MainActivity m=0x0}, false
19:39:24.940 1322-5062/? I/ActivityTaskManager: START u0 {act=com.hoxfon.react.RNTwilioVoice.ACTION_INCOMING_CALL flg=0x4000000 cmp=<MY_APP>/com.hoxfon.MainActivity (has extras)} from uid 10469 pid -1
19:39:24.941 1322-5062/? W/ActivityTaskManager: startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { act=com.hoxfon.react.RNTwilioVoice.ACTION_INCOMING_CALL flg=0x4000000 cmp=<MY_APP>/com.hoxfon.MainActivity (has extras) }
19:39:29.619 18688-18883/<MY_APP> D/RNTwilioVoice: initWithAccessToken()
19:39:29.620 18688-18883/<MY_APP> I/RNTwilioVoice: Registering with FCM

Could anybody try this scenario and verify whether this is a device specific bug?

@fabriziomoscon Yes.. TwilioVoice.getCallInvite() gets called when the device is locked but it does not unlock the device automatically...No activity invoke when device is in background without lock.. only the connectionDidConnect invoked on answering call. I have tested in samsung galaxy m11 device

@fabriziomoscon Yes.. TwilioVoice.getCallInvite() gets called when the device is locked but it does not unlock the device automatically...No activity invoke when device is in background without lock.. only the connectionDidConnect invoked on answering call. I have tested in samsung galaxy m11 device

@fabriziomoscon How to handle permission if we denied microphone permission... if i answer the call on event triggered.. Here i need to ask permission

@fabriziomoscon How to handle permission if we denied microphone permission... if i answer the call on event triggered.. Here i need to ask permission

@fabriziomoscon I can also confirm that when the device is locked no activity is launched and the device just starts ringing on a blank screen.

@fabriziomoscon I can also confirm that when the device is locked no activity is launched and the device just starts ringing on a blank screen.

@fabriziomoscon Any solution to clear heads-up notifiation after call end ?

@fabriziomoscon Any solution to clear heads-up notifiation after call end ?

@fabriziomoscon Any solution to clear heads up notification after call end ?

@fabriziomoscon Any solution to clear heads up notification after call end ?

Thanks for the reply @Samsritha1596. I'll give it a try in the Tesflight build.

Thanks for the reply @Samsritha1596. I'll give it a try in the Tesflight build.

After the fresh installation on the android device. App crashes the first time but after that, if we reopen the app, It starts functioning normally and doesn't crash. After debugging I'm able to get these logs
Android Studio Logs
2021-01-11 18:38:05.343 20282-20282/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.free.myapp, PID: 20282
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.free.popup_automessenger/com.free.myapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2957)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6944)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference
        at com.free.popup_automessenger.MainActivity$1.getLaunchOptions(MainActivity.java:37)
        at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:78)
        at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:45)
        at android.app.Activity.performCreate(Activity.java:7183)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6944)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Code which causing this issue ( at MainActivity.java:37 - getLaunchOptions )
package com.free.myapp;
import android.content.Intent;
import android.os.Bundle;

import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.hoxfon.react.RNTwilioVoice.Constants;

import com.facebook.react.ReactActivity;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

public class MainActivity extends ReactActivity {

  /**
   * Returns the name of the main component registered from JavaScript. This is used to schedule
   * rendering of the component.
   */
  @Override
  protected String getMainComponentName() {
    return "popup_automessenger";
  }

  @Override
  protected ReactActivityDelegate createReactActivityDelegate() {
    return new ReactActivityDelegate(this, getMainComponentName()) {
      @Override
      protected ReactRootView createRootView() {
        return new RNGestureHandlerEnabledRootView(MainActivity.this);
      }
      @Override
      protected Bundle getLaunchOptions() {
        Bundle initialProperties = new Bundle();
        Intent intent = this.getPlainActivity().getIntent();
        if (intent == null) {
          return initialProperties;
        }
        switch (intent.getAction()) {.      // This is line 37
          case Constants.ACTION_INCOMING_CALL_NOTIFICATION:
            Bundle callInviteBundle = new Bundle();
            callInviteBundle.putString(Constants.CALL_SID, intent.getStringExtra(Constants.CALL_SID));
            callInviteBundle.putString(Constants.CALL_FROM, intent.getStringExtra(Constants.CALL_FROM));
            callInviteBundle.putString(Constants.CALL_TO, intent.getStringExtra(Constants.CALL_TO));
            initialProperties.putBundle(Constants.CALL_INVITE_KEY, callInviteBundle);
            break;

          case Constants.ACTION_ACCEPT:
            Bundle callBundle = new Bundle();
            callBundle.putString(Constants.CALL_SID, intent.getStringExtra(Constants.CALL_SID));
            callBundle.putString(Constants.CALL_FROM, intent.getStringExtra(Constants.CALL_FROM));
            callBundle.putString(Constants.CALL_TO, intent.getStringExtra(Constants.CALL_TO));
            callBundle.putString(Constants.CALL_STATE, Constants.CALL_STATE_CONNECTED);
            initialProperties.putBundle(Constants.CALL_KEY, callBundle);
            break;
        }
        return initialProperties;
      }
    };
  }

}

@Samsritha1596 Are you also experiencing this issue?
@fabriziomoscon If you could take a look at this that will be really helpful.

After the fresh installation on the android device. App crashes the first time but after that, if we reopen the app, It starts functioning normally and doesn't crash. After debugging I'm able to get these logs
Android Studio Logs
2021-01-11 18:38:05.343 20282-20282/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.free.myapp, PID: 20282
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.free.popup_automessenger/com.free.myapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2957)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6944)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference
        at com.free.popup_automessenger.MainActivity$1.getLaunchOptions(MainActivity.java:37)
        at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:78)
        at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:45)
        at android.app.Activity.performCreate(Activity.java:7183)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)
        at android.os.Handler.dispatchMessage(Handler.java:105)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6944)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Code which causing this issue ( at MainActivity.java:37 - getLaunchOptions )
package com.free.myapp;
import android.content.Intent;
import android.os.Bundle;

import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.hoxfon.react.RNTwilioVoice.Constants;

import com.facebook.react.ReactActivity;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

public class MainActivity extends ReactActivity {

  /**
   * Returns the name of the main component registered from JavaScript. This is used to schedule
   * rendering of the component.
   */
  @Override
  protected String getMainComponentName() {
    return "popup_automessenger";
  }

  @Override
  protected ReactActivityDelegate createReactActivityDelegate() {
    return new ReactActivityDelegate(this, getMainComponentName()) {
      @Override
      protected ReactRootView createRootView() {
        return new RNGestureHandlerEnabledRootView(MainActivity.this);
      }
      @Override
      protected Bundle getLaunchOptions() {
        Bundle initialProperties = new Bundle();
        Intent intent = this.getPlainActivity().getIntent();
        if (intent == null) {
          return initialProperties;
        }
        switch (intent.getAction()) {.      // This is line 37
          case Constants.ACTION_INCOMING_CALL_NOTIFICATION:
            Bundle callInviteBundle = new Bundle();
            callInviteBundle.putString(Constants.CALL_SID, intent.getStringExtra(Constants.CALL_SID));
            callInviteBundle.putString(Constants.CALL_FROM, intent.getStringExtra(Constants.CALL_FROM));
            callInviteBundle.putString(Constants.CALL_TO, intent.getStringExtra(Constants.CALL_TO));
            initialProperties.putBundle(Constants.CALL_INVITE_KEY, callInviteBundle);
            break;

          case Constants.ACTION_ACCEPT:
            Bundle callBundle = new Bundle();
            callBundle.putString(Constants.CALL_SID, intent.getStringExtra(Constants.CALL_SID));
            callBundle.putString(Constants.CALL_FROM, intent.getStringExtra(Constants.CALL_FROM));
            callBundle.putString(Constants.CALL_TO, intent.getStringExtra(Constants.CALL_TO));
            callBundle.putString(Constants.CALL_STATE, Constants.CALL_STATE_CONNECTED);
            initialProperties.putBundle(Constants.CALL_KEY, callBundle);
            break;
        }
        return initialProperties;
      }
    };
  }

}

@Samsritha1596 Are you also experiencing this issue?
@fabriziomoscon If you could take a look at this that will be really helpful.

@salman-pixarsart No, i didn't face this issue
@fabriziomoscon Any updates to clear heads up notification after call end ?

@salman-pixarsart No, i didn't face this issue
@fabriziomoscon Any updates to clear heads up notification after call end ?

Thank you guys for testing. For all reported bugs that don't require further clarification, I have created a checkbox in the PR description. I suggest that I provide fixes for those before we start discussing the issues I didn't list.

Thank you guys for testing. For all reported bugs that don't require further clarification, I have created a checkbox in the PR description. I suggest that I provide fixes for those before we start discussing the issues I didn't list.

@salman-pixarsart
Previously, in order to launch the app when receiving a call, the flow was:

this module would launch the app normally
the JS would always request the module whether there were incoming calls
if there where any incoming call request the module would use an event to communicate with JS the incoming call parameters
the JS would listen to the event and launch the view with the appropriate incoming call answer/reject controls.

This loop was long and prone to race conditions in case the event was fired before the root view in JS were completely initialised.
This version replaces the previous flow by using getLaunchOptions() to pass initial properties from native to JS when receiving a call as explained here: https://reactnative.dev/docs/communication-android
To check for properties I use an Android's intent.
The crash you reported here https://github.com/hoxfon/react-native-twilio-programmable-voice/pull/164#issuecomment-757965249 is caused by hashCode() called on null:
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference
        at com.free.popup_automessenger.MainActivity$1.getLaunchOptions(MainActivity.java:37)

However, this module has checks for intent not null:
        Intent intent = getCurrentActivity().getIntent();
        if (intent == null) {
            return;
        }
        int currentCallInviteIntent = intent.hashCode();

I am not able to reproduce your error. And I am not really able to understand which hashCode() generated this FATAL ERROR. The issue might be with a specific implementation of your app `com.free.popup_automessenger.
My suggest would be:

check whether your app MainActivity class needs you to override protected void onCreate(Bundle savedInstanceState)
look for hashCode() in your app's code
to receive more help you could: open an issue (to allow me to focus on that), with the RN version you are using, a video for the crash in the simulator and the logs. And include the logs line before and after the crash.

Thank you for testing.

@salman-pixarsart
Previously, in order to launch the app when receiving a call, the flow was:

this module would launch the app normally
the JS would always request the module whether there were incoming calls
if there where any incoming call request the module would use an event to communicate with JS the incoming call parameters
the JS would listen to the event and launch the view with the appropriate incoming call answer/reject controls.

This loop was long and prone to race conditions in case the event was fired before the root view in JS were completely initialised.
This version replaces the previous flow by using getLaunchOptions() to pass initial properties from native to JS when receiving a call as explained here: https://reactnative.dev/docs/communication-android
To check for properties I use an Android's intent.
The crash you reported here https://github.com/hoxfon/react-native-twilio-programmable-voice/pull/164#issuecomment-757965249 is caused by hashCode() called on null:
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference
        at com.free.popup_automessenger.MainActivity$1.getLaunchOptions(MainActivity.java:37)

However, this module has checks for intent not null:
        Intent intent = getCurrentActivity().getIntent();
        if (intent == null) {
            return;
        }
        int currentCallInviteIntent = intent.hashCode();

I am not able to reproduce your error. And I am not really able to understand which hashCode() generated this FATAL ERROR. The issue might be with a specific implementation of your app `com.free.popup_automessenger.
My suggest would be:

check whether your app MainActivity class needs you to override protected void onCreate(Bundle savedInstanceState)
look for hashCode() in your app's code
to receive more help you could: open an issue (to allow me to focus on that), with the RN version you are using, a video for the crash in the simulator and the logs. And include the logs line before and after the crash.

Thank you for testing.

@Samsritha1596 @salman-pixarsart @jdegger
I have added a commit to handle call invites when the phone is locked. Please test and tell me if it fixes a few issues reported above. Note that I changed the PR description to add know issues.

@Samsritha1596 @salman-pixarsart @jdegger
I have added a commit to handle call invites when the phone is locked. Please test and tell me if it fixes a few issues reported above. Note that I changed the PR description to add know issues.

@salman-pixarsart
Previously, in order to launch the app when receiving a call, the flow was:

this module would launch the app normally
the JS would always request the module whether there were incoming calls
if there where any incoming call request the module would use an event to communicate with JS the incoming call parameters
the JS would listen to the event and launch the view with the appropriate incoming call answer/reject controls.

This loop was long and prone to race conditions in case the event was fired before the root view in JS were completely initialised.
This version replaces the previous flow by using getLaunchOptions() to pass initial properties from native to JS when receiving a call as explained here: https://reactnative.dev/docs/communication-android
To check for properties I use an Android's intent.
The crash you reported here #164 (comment) is caused by hashCode() called on null:
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference
        at com.free.popup_automessenger.MainActivity$1.getLaunchOptions(MainActivity.java:37)

However, this module has checks for intent not null:
        Intent intent = getCurrentActivity().getIntent();
        if (intent == null) {
            return;
        }
        int currentCallInviteIntent = intent.hashCode();

I am not able to reproduce your error. And I am not really able to understand which hashCode() generated this FATAL ERROR. The issue might be with a specific implementation of your app `com.free.popup_automessenger.
My suggest would be:

check whether your app MainActivity class needs you to override protected void onCreate(Bundle savedInstanceState)
look for hashCode() in your app's code
to receive more help you could: open an issue (to allow me to focus on that), with the RN version you are using, a video for the crash in the simulator, and the logs. And include the logs line before and after the crash.

Thank you for testing.

@fabriziomoscon I'm able to solve this by adding a couple of lines in your code in the main activity of my app.
What I'm doing is just verifying if the intent's action is null or not. If null just return the initial properties.
      protected Bundle getLaunchOptions() {
        Bundle initialProperties = new Bundle();
        Intent intent = this.getPlainActivity().getIntent();
        String appAction = intent.getAction();
        if ( appAction == null) {
          return initialProperties;
        }
        switch (appAction) {
          case Constants.ACTION_INCOMING_CALL_NOTIFICATION:
            Bundle callInviteBundle = new Bundle();
            callInviteBundle.putString(Constants.CALL_SID, intent.getStringExtra(Constants.CALL_SID));
            callInviteBundle.putString(Constants.CALL_FROM, intent.getStringExtra(Constants.CALL_FROM));
            callInviteBundle.putString(Constants.CALL_TO, intent.getStringExtra(Constants.CALL_TO));
            initialProperties.putBundle(Constants.CALL_INVITE_KEY, callInviteBundle);
            break;

          case Constants.ACTION_ACCEPT:
            Bundle callBundle = new Bundle();
            callBundle.putString(Constants.CALL_SID, intent.getStringExtra(Constants.CALL_SID));
            callBundle.putString(Constants.CALL_FROM, intent.getStringExtra(Constants.CALL_FROM));
            callBundle.putString(Constants.CALL_TO, intent.getStringExtra(Constants.CALL_TO));
            callBundle.putString(Constants.CALL_STATE, Constants.CALL_STATE_CONNECTED);
            initialProperties.putBundle(Constants.CALL_KEY, callBundle);
            break;
        }
        return initialProperties;
      }
    };

Also replacing  below code in onHostResume() in TwilioVoiceModule.java
        if (intent == null) {
            return;
        }

with
     if (intent == null || intent.getAction() == null) {
           return
            }

@salman-pixarsart I see. That means that sometimes even if intent is not null the action can be null?
Is your fix related to this other PR: https://github.com/hoxfon/react-native-twilio-programmable-voice/pull/186/files ?

@fabriziomoscon Yes. On initial install an intent exist to invoke the app but there's no action in that intent. Thats why it was causing  app crash on initial install.

Hi @fabriziomoscon! I've prepared updates to this branch incl. unregistartion for Android/IOS, and I also solved an issue with  "Call invite heads-up notification are not auto cancelled". Can we contact somehow to include those changes to  #164 PR?

Android 12 support: https://github.com/hoxfon/react-native-twilio-programmable-voice/issues/211#issuecomment-1165048758


Add option to not record GUI

No complaints on code formatting, checked for introduced NPEs and non-catched RuntimeExceptions.
Functionality seems useful to me (you could always just press F1, but it is a reasonable QOL improvement)
Accepted, thanks :)


Using images with slingshot example

I'm not sure if this is the right place to post this question, but how do I get the slingshot example to work with images?
I figured out how to build the dev version with images by adding the following line to the getLoaders function in webpack.config.js:
{ test: /\.(jpe?g|png|gif|svg)$/i, loaders: ['url?limit=8192', 'img']}
But I can't figure out how to add the images to the build when you run npm run build.  I know that I need to add  && mkdir images to the create-dist command, but I haven't been able to figure out the remaining steps.  Any advice would be greatly appreciated.

A commit I made yesterday split the webpack.config into separate dev and prod versions for readability. Whatever loader you add for dev you'll need to add to the prod config as well.

Thanks for the reply!
Just remembered that I was building off of the Tour of Heroes repo, so I didn't have the latest changes.  I took a look at your commit and did a pull, and I see images working on dev out of the box.
However, I still don't know how to get the images included in the prod build.  Is there an extra step I need to add for that?  Really all I would need is to copy my /images folder from /src to /dist but I'm new to Webpack so I haven't been able to figure that out quite yet.

Required images should work in the prod build with Slingshot. It's configured in the prod webpack config.


Fix iree-dialects builds for MSVC.

See each commit for details.

Build failures are from force pushing a few times, waiting for them to resolve then will likely merge this so we can get some Windows package releases over the weekend. Or, we'll see if something else broke in the releases that my local dev environment missed :D


Admin Hub UI Design Improvements

Currently, the admin hub is very much based upon Tailwind UI basic components, which worked well for the period of rapid development. However, the fundamental functionality is now starting to stabilise, so we wish to improve the hub's UI.
Things we want to achieve are...

Consistency
More efficient use of space
UI components which are designed to be extended
Professional design
Subtle UI animations to support the UX

I think you are trying to reinvent a wheel here. Since you are an opensource project I would suggest you guys to use https://github.com/filamentphp/filament/ instead. It already covers all your requirements and even more. Lunar admin panel is never going to be as good as filamentphp one so I suggest you guys to reevaluate your roadmap and focus on ecommerce part instead.

We have reviewed FilamentPHP and we do not wish to use it. I understand it is very good for CRUD applications, but we wish to maintain full control over our UI.

Please add "RTL Support" to this list.


add metaprogramming test+doc

adds metaprogramming functions to allow us extend existing pytorch modules easily to support our creator workflow

merged into vhdl_lut pr


Breaking change in dependency

As the "minecraft-prackets" module updated from version 1.5 to 1.7 a breaking change was introduced:
getPacket() in /src/instant_connect_proxy.js uses
let packet = packets[ver]?.['from-server']?.[name][0].json where ver is "1.8" (as defined in the verMap)
but version "1.8" was renamed to "1.8.8" in "minecraft-packets", so the packet variable here is always undefined.
https://github.com/PrismarineJS/minecraft-packets/tags
updating verMap to
const verMap = {
'1.8.8': '1.8.8', // used to map to 1.8
'1.8.9': '1.8.8' // used to map to 1.8
}
is a quick fix but maybe other breaking changes where introduced in minecraft-packets?
Alternatively use the outdated minecraft-packets module in package.json:
"minecraft-packets": "^1.5.0" to "minecraft-packets": "1.5.0"

Let's fix it here
On Tue, Dec 24, 2024, 19:05 covy @.***> wrote:

As the "minecraft-prackets" module updated from version 1.5 to 1.7 a
breaking change was introduced:
getPacket() in /src/instant_connect_proxy.js uses
let packet = packets[ver]?.['from-server']?.[name][0].json where ver is
"1.8" (as defined in the verMap)
but version "1.8" was renamed to "1.8.8" in "minecraft-packets", so the
packet variable here is always undefined.
https://github.com/PrismarineJS/minecraft-packets/tags
updating verMap to
const verMap = {
'1.8.8': '1.8.8', // used to map to 1.8
'1.8.9': '1.8.8' // used to map to 1.8
}
is a quick fix but maybe other breaking changes where introduced in
minecraft-packets?
Alternatively use the outdated minecraft-packets module in package.json:
"minecraft-packets": "^1.5.0" to "minecraft-packets": "1.5.0"
—
Reply to this email directly, view it on GitHub
https://github.com/PrismarineJS/prismarine-proxy/issues/42, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAR437WYL5EYO26UXW2UYHD2HGPABAVCNFSM6AAAAABUFA3AUOVHI2DSMVQWIX3LMV43ASLTON2WKOZSG42TQMJXG44DANA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Clusters with AWS cloud provider enabled and using a VPC with private hosted zones (custom DNS) can't use cloud provider resources

What kind of request is this (question/bug/enhancement/feature request):
bug
Steps to reproduce (least amount of steps as possible):

create a new windows custom cluster
enable the AWS cloud provider
try to join EC2 windows worker nodes in us-gov-west region to the cluster using the docker run command

Result:
attempts to add new windows ec2 worker nodes in us-gov-west region will fail
Other details that may be helpful:
If a custom cluster with live Windows nodes is switched from having no cloud provider to using the AWS cloud provider, the windows node will disappear from the cluster view and new ones cannot be added.
Linux only clusters in the us-gov-west function as expected when using the AWS cloud provider with a custom cluster
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): v2.4.5
Installation option (single install/HA): HA

Cluster information

Cluster type (Hosted/Infrastructure Provider/Custom/Imported): Custom with AWS cloud provider enabled
Kubernetes version (use kubectl version): tested both v1.17.4 and v1.18.6

gz#11752

@rosskirkpat One thing to point out is that this use case is not supported (for windows or linux). If a user decides to "switch" to enable/disable cloud providers, then they need to start a new cluster with or without the cloud provider enabled.
If a custom cluster with live Windows nodes is switched from having no cloud provider to using the AWS cloud provider,

From my understanding with @luthermonson, this is not how they are "switching" but I also wanted to clarify to ensure that they aren't doing it. My understanding is that they are actually starting new clusters with it enabled and still seeing this problem.

On 2.4.5

Deployed a 4 node windows cluster - 2 linux nodes - 1 etcd/control and 1 worker nodes, 2 windows worker nodes (from gov cloud )
Enable cloud provider. (cluster k8s version: 1.18.10)
Register the nodes.
The cluster comes up
Create a PV and attach it to a workload by creating a PVC.
PV is attached successfully

When using DHCP Options Sets, only one domain name can be specified in the domain-name field. This is a requirement on the AWS side: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html

Note: This has been narrowed down that this is not only Windows cluster, but all cluster types.

Some issues to refer to for this issue:

https://github.com/kubernetes/kubernetes/issues/11543
https://github.com/kubernetes/kubernetes/issues/61486

Based on this it seems like a years old problem that is not being actively worked on. It doesn't seem that the out-of-tree cloud provider for AWS has made changes around this.
@luthermonson @rosskirkpat Can you confirm this is accurate and I'm not mistaken the issue for something else?

According to @rosskirkpat , this is no longer an issue.


chore(next-less): update less-loader to v5.0.0

This closes #518

I'm going to close this in favor of https://github.com/zeit/next.js/issues/8626
Thanks for your contribution 🙏


[BUG] Unable to run rt2x example script when running from source

Describe the bug
To Reproduce
% pip install rtx-torch
% python rtx2_example.py

Output:
(rtx1) sebastianperalta@Sebastians-MacBook-Pro RT-X % python rtx2_example.py
Traceback (most recent call last):
  File "/Users/sebastianperalta/simply/dev/simply-mono/RT-X/rtx2_example.py", line 2, in <module>
    from rtx import RTX2
  File "/Users/sebastianperalta/simply/dev/simply-mono/RT-X/rtx/__init__.py", line 1, in <module>
    from rtx.rtx2 import RTX2
  File "/Users/sebastianperalta/simply/dev/simply-mono/RT-X/rtx/rtx2.py", line 4, in <module>
    from zeta.nn.architecture import (
  File "/Users/sebastianperalta/simply/dev/simply-mono/venvs/rtx1/lib/python3.11/site-packages/zeta/__init__.py", line 40, in <module>
    from zeta.logo import print_colored_logo
  File "/Users/sebastianperalta/simply/dev/simply-mono/venvs/rtx1/lib/python3.11/site-packages/zeta/logo.py", line 1, in <module>
    from rich import print as rich_print
ModuleNotFoundError: No module named 'rich'

Additional context
python3.11
MacOS

Upvote & Fund

We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.

@sebbyjp I have justed tried to fix this error, let me know if it works!


special handling for some budgets/contracts

There is a demand of shifting or duplicating contracts/budgets to/for the next year if the total budget isnt burnt totally. In that case it would be good to see the burned budget of the past year but only count the budget in the new year, which got burned in the new year.

I'm much in favour of this feature request. In my opinion, it would suffice to add a number besides Net Budget Total called Net Budget Carry-Over which contains, when filled, the amount against which Left and Unplanned should be computed, while reporting should transport both the Total and the Carry-Over amounts.

This can maybe implemented by generating a set of manual records (cf. #315) for carry-overs.

I have been using manual records for this for a while, using a manual contract field "Total net budget amount (rollover contracts)" as a documentary vehicle to carry the original total budget.
Main issues:

Additional information are text only. I would prefer a monetary field.
the net budget amount is a derived field based on the data from another project (prior calculation period). The link, however, is manual, and carry-over must be done manually and redone if the prior calculation period closure changes.

I am creating two successor tickets addressing these issues separately.


Bigint support

I'm currently using fs.Stats.ino numbers to detect renames, but this is especially flawed on Windows (https://github.com/nodejs/node/issues/12115) where multiple files can get assigned the same ino number because they overflow the maximum storable number in JS.
The solution would be to tell fs.stat to return bigints instead, which don't have this issue.
I could query fs.stat with the { bigint: true } option myself, but I'd rather reuse the stats object provided by chokidar, for performance.
I see no option for enabling bigints in chokidar, can it be added?

Should be fixed in new chokidar release.

@paulirish has an option been added for this already? And can you say roundabout when the new release will be published?

It'll use bigints on windows automatically for nodejs 10+. Try it out later this week.

@paulirish I'm not sure this implicit behavior is necessarily what we want, wouldn't it be better to enable bigints on all platforms instead? The fact that currently those regular ino numbers overflow on Windows may change with a macOS update or something, maybe it happens already under macOS as well but it's more rare.

I think they've added the option because of windows FS. If we'll receive additional bug reports, we'll add it. I think it brings some overhead, but not sure.
BTW readdirp 3.0.3 is out — so do npm update and try it; it'll use bigints.


Rework JS manual instrumentation docs

Goal of this PR is to rework the manual instrumentation docs significantly:

Make use of the "roll the dice" application to have an application to follow along & try things out
Split out signal-independent setup instructions (dependencies, resource attributes setup)
Add a lot of text, examples, etc.

I raise this as a draft PR first, please provide your feedback if this is going in the right direction, there is some more cleanup & functional testing that needs to be done.

Preview: https://deploy-preview-2965--opentelemetry.netlify.app/docs/instrumentation/js/manual/

I like the overall concept a lot.

Okay, re-review -- I think this looks good overall.

Thanks!

I think we should finally switch over to the NodeSDK. It aligns with getting-started and it's just so much nicer to use. Plus it makes the exporter bit make sense.

I rewrote a big chunk of that with https://github.com/open-telemetry/opentelemetry.io/pull/2965/commits/04857380b806d89c0614d9542594fdd0b31515db. I kept the other ways of initializing the TracerProvider / MeterProvider in the docs for completeness, not sure if this makes things more complicated or not, wdyt?
Note: I have not tested out the code samples yet in detail, just copied them over, will validate them, right now I am more curious if the structure of the text makes sense so far

not sure if this makes things more complicated or not, wdyt?

Hmmm, I think it it does. I could see someone getting confused and trying to put this code in their existing Node SDK initialization stuff. I think we should really just do one or the other, with a preference towards the Node SDK. But I guess @open-telemetry/javascript-approvers could have a final say?

@chalin the markdown lint is dropping me some errors I can not manage, as they are related to some hugo-quirks (shortcodes, link fragments, etc.), can you take a look at that?

@svrnm - yes, I think I know why. Looking into it now.

@svrnm - could you rebase and resolve conflicts first?

@svrnm - could you rebase and resolve conflicts first?

I don't see a conflict

I don't see a conflict

Try to rebase from main@HEAD locally.

Rebasing should resolve the check-failure issues.

@JamieDanielson @pichlermarc any more remarks from your site?

@svrnm - can you rebase and resolve conflicts?


[10.x] Allow apiResource and resource routes to specify middleware per action

While working on my project I was trying to attach different middlewares to an api resource route and I noticed currently the framework only allows to apply the same middleware to all of the actions of the given route. The only current solution is to do it inside the controller constructor while with this PR devs will be able to specify the middleware they want to associate to each action in a resource route directly from the route definition.
Route::resource('users', UserController::class)
    ->middleware([
        'index' => ['can:viewAny,'.User::class,'another_needed'],
        'store' => ['auth','can:create,'.User::class,'some other'],
        'show' => [ApiTokenRequired::class],
    ]);

It is backwards compatible with the other options of setting middleware

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


Radio button keyboard focus indicator doesn't scroll with control

🐛 Bug Report
The radio button shows a thick border when you give it tab focus but that border is positioned on the page at the component's original location and doesn't move if the component scrolls.
💻 Repro or Code Sample

Open the Angular example app in a browser window that is tall enough for the radio button to appear on screen when the page loads.
Tab until it has focus
Scroll the page

🤔 Expected Behavior
Thick focus ring moves with the radio button

😯 Current Behavior
Focus ring stays at the same screen location while the component scrolls away

💁 Possible Solution
The focus indicator is an :after pseudo element. It probably needs to be positioned differently relative to its parent.
🔦 Context

🌍 Your Environment

OS & Device: macOS
Browser: Reproduced in Safari, Chrome, Firefox

Doesn't show up for me at all in Safari 16.4 lol

@rajsite is it possible your browser window wasn't tall enough for the radio buttons to be on screen when the page first loaded? In that situation the focus indicator is permanently scrolled offscreen. I saw the same behavior when trying to reproduce in other browsers and thought at first that it was a difference in browser behavior before realizing it was a difference in how big my browser windows were.
But for the record I reproduced it in 16.3 and haven't tried 16.4 so it could be version-specific.

@rajsite is it possible your browser window wasn't tall enough for the radio buttons to be on screen when the page first loaded?

That appears to be the case! And you call that out in the repro steps so woops, my bad. I can reproduce the exact behavior shown in 16.4


Examples

Some usage examples would be very valuable. Thanks!

How ’bout these?

Or, are you wanting to see HTML examples as well? That would be cool. :+1:

Interesting idea. For now, http://css-tricks.com/snippets/css/a-guide-to-flexbox/ is prob the best reference in the meantime. ;)

these two things together work perfectly.
very excited to start using flex box.


update with duplicate ids

Which @ngneat/elf-* package(s) are the source of the bug?
store
Is this a regression?
No
Description
When performing a store.update with multiple entities (using setEntities, addEntities, ...), if two objects have the same ID the resulting store will have them both. Expected?
Obviously it's a bug from the caller, but still I would not expect a tainted store: even throwing an error is a better solution in this case IMO.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/angular-ivy-xvpq7m?file=src/app/todos/state/todos.repository.ts
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
No response
Anything else?
No response
Do you want to create a pull request?
No

Thank you. I'll take care of it some time next week.

Thank you!
Please note the same issue is present in akita, i filed a similar report there: https://github.com/datorama/akita/issues/796


Contact Form vs Email Link

Just a suggestions. My biggest pet peeve is those auto-email links! I just clicked the one on your site  5 times in a row because nothing was happening, which opened Outlook 5 times and crashed my computer.
It's just my opinion, but I think you're better off using the boilerplate contact form from the Keystone Demo site or just have a static page with some contact details.
Thanks for the awesome work guys!
~ Kyle

Sadly, most of the site is in jade, and I started the example with handlebars. It was a painstaking change to make to get a contact form.
My question: Is there a way to use both jade and handlebars in the same project? That would be nice.
Here is the jade template I made:
`
extends ../../layouts/default
block content
.section
	.container
		form(method='post', enctype='multipart/form-data', autocomplete='off', novalidate).form-horizontal.create-form.profile-form
			input(type='hidden', name='action', value='contact')

			.row: .col-sm-8.col-sm-offset-2

				//- Title
				.form-group
					h1 Create an enquiry
					input(type='text', name='topic', placeholder='Topic').input.input-l.input-faded

				//- name
				.form-group
					label Name
					input(type='text', name='name').form-control

				//- email
				.form-group
					label Email
					input(type='email', name='email',value=formData.email).form-control

				//- Phone
				.form-group
					label Contact Phone
					input(type='text', name='phone', placeholder='(optional)').form-control

				.form-group
					label Enquiry Type
					select(name='enquiryType').form-control
						option(value='') (select one)
						option(value='customer') Seeking education
						option(value='vendor') Offering educational resources
						option(value='general') Looking for conversation

				//- Content
				.form-group
					label Post content
					textarea(name='content.extended', class='wysiwyg').input.input-faded

				//- Submit
				.form-group
					button(type='submit', data-loading-text="Changing...").btn.btn-lg.btn-primary.btn-block Submit Enquiry

block js
script(src='/js/lib/bootstrap/button.js')
script(src='/js/lib/tinymce/tinymce.min.js')
script(src='/js/lib/tinymce/jquery.tinymce.min.js')
script.
jQuery(function($) {
$( "#post-title" ).focus();
tinymce.init({
selector: 'textarea.wysiwyg',
menubar: false,
height: 400,
plugins: [ 'code', 'link' ],
toolbar: 'bold italic | alignleft aligncenter alignright | bullist numlist | outdent indent | link | code',
skin: 'keystone'
});
});
`

Oops! markdown was not so supportive this time.


added beta 29 relnotes placeholders, info for issues re: virtualizati…

@thaJeztah please have a look also

@mstanleyjones @MagnusS - Release notes for Beta 29 Mac and Windows

@friism @dgageot @srinathanand - Added extra pre-requisite for Windows that virtualization must be enabled and link to new topic in troubleshooting (per https://github.com/docker/for-win/issues/74)

@friism @ManoMarks @patricklang - Added links to blog post and labs re: examples of how to use Windows containers feature (per https://github.com/docker/docker.github.io/issues/154) (Let me know if I took too many liberties here, or if you don't want the lab linked to yet.

Signed-off-by: Victoria Bialas<EMAIL_ADDRESS>

ok, since there are no comments, I'm going to merge this

Thanks @londoncalling, this looks good.

LGTM too.


Show on App Launch: Open launch option when set

Task/Issue URL: https://app.asana.com/0/1207908166761516/1208167186867417/f
Description
Adds functionality to open the show on app launch option based on what has been set.
If there is no specialised launch happening then we check the show on app launch setting:

If LastOpenedTab is set, we do nothing as this is current behaviour
If NewTabPage is set then we open a new tab
If SpecificPage is set we compare the url to the current selected tab, if it's not the same we open a new tab otherwise we do nothing

Also as part of this PR, we add validation to the URL:

It is blank will set it as a default to duckduckgo.com
If it has no scheme will add http (in case the website does not currently support https)
Otherwise return the url what was passed in

Steps to test this PR
Last Opened Tab

[x] Set "Show on App Launch" to Last Opened Tab
[x] Exit Settings
[x] Remember your current tab and tab count
[x] Force close the app via recents
[x] Open the app
[x] Check the tab is the same as when you closed
[x] Ensure the tab count has not increased

New Tab Page

[x] Set "Show on App Launch" to New Tab Page
[x] Exit Settings
[x] Remember your current tab and tab count. If this is the New Tab Page then please open a website e.g. “bbc.com"
[x] Force close the app via recents
[x] Open the app
[x] Check the tab is now the New Tab Page
[x] Ensure the tab count has increased by one
[x] Force close the app via recents
[x] Open the app
[x] Check the tab is still the New Tab Page
[x] Ensure the tab count has not increased by one

Specific Page

[x] Set "Show on App Launch" to Specific Page
[x] Check the default URL is “https://duckduckgo.com/”
[x] Exit Settings
[x] Remember your current tab (it should not be “https://duckduckgo.com/”) and tab count
[x] Force close the app via recents
[x] Open the app
[x] Check the tab is now https://duckduckgo.com/
[x] Ensure the tab count has increased by one (if your tab was on the new tab page before you force closed it would not increase)
[x] Force close the app via recents
[x] Open the app
[x] Check the tab is still https://duckduckgo.com/
[ ] Ensure the tab count has not increased by one

Specific Page Lowercasing

[x] Set "Show on App Launch" to Specific Page
[x] Change the default URL to “BBC.com”
[x] Press back
[x] Check that under the "Show on App Launch” setting the url is “http://bbc.com”

Specific Page Updated

[x] Set "Show on App Launch" to Specific Page
[x] Change the default URL to a different url e.g. “cnn.com"
[x] Exit Settings
[x] Remember your current tab (it should not be the same url you entered earlier) and tab count
[x] Force close the app via recents
[x] Open the app
[x] Check the tab is now the url you set e.g. cnn.com
[x] Ensure the tab count has increased by one

Specific Page Not a URL

[x] Set "Show on App Launch" to Specific Page
[x] Change the default URL to a url that is invalid e.g. “example"
[x] Press back
[x] Check that under the "Show on App Launch” setting the url is “http://example”
[x] Remember your current tab (it should not be the same url you entered earlier) and tab count
[x] Force close the app via recents
[x] Open the app
[x] Check the tab has attempted to load "http://example"
[x] Ensure the tab count has increased by one

Specific Page Different Scheme

[x] Set "Show on App Launch" to Specific Page
[x] Change the default URL to a url with a different scheme e.g. “ftp://file.com"
[x] Press back
[x] Check that under the "Show on App Launch” setting the url is still “ftp://file.com”

UI changes
N/A
Demo
https://github.com/user-attachments/assets/6296bd2e-d083-46fd-a738-787e8bf2b6ee

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#4995  👈
#4980
#4952
#4950
#4946
#4944
develop

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @mikescamell and the rest of your teammates on  Graphite

LGTM 👍
I didn't tick Ensure the tab count has *not increased by one as the tab count is increased due to the trailing "/".

I’ve moved the default url to be https://duckduckgo.com/ seeing as we always append the slash. There’s no good reason for that not to be the default. I updated the test cases to reflect this.


TypeError: this.afterReconnect is not a function

Happens from time to time

This happened when you tried to do an API call while the lib was reconnecting. Should be fixed now!

published in<EMAIL_ADDRESS>if you were using the NPM package.


Error in detection of inline query type?

I wrote a bot that takes an inline query and returns gif options. I construct my responses as such:
InlineQueryResultGif(
    type = "gif",
    id = data["id"],
    gif_url = data["url"],
    gif_width = data["width"],
    gif_height = data["height"],
    thumb_url = data["thumb_url"]
)

But on some queries I'm getting the following error:
TelegramError: (u'Bad Request: Can\'t find field "gif_file_id"', 400, {u'error_code': 400, u'ok': False, u'description': u'Bad Request: Can\'t find field "gif_file_id"'})
As far as I understand gif_file_id is part of InlineQueryResultCachedGif and not InlineQueryResultGif. I've review my result and they seem ok, I don't know which one specifically causes the problem.
This is using the latest telepot version and python 2.7.6. I tried using python 3.5 to see what it says, but with it I'm getting: ValueError: Invalid answer format.

My guess is this. If you look at the Bot API spec of InlineQueryResultGif and InlineQueryResultCachedGif. They both have the type gif. The only way for Telegram to distinguish the two is by the presence of the field gif_file_id or gif_url.
Is it possible that some of your data["url"] may be None or 0 or empty string or something like that? When Telegram does not see a gif_url, it may look for gif_file_id, which causes the error you saw.

Yep, you're right. I was returning objects with value None for "gif_url". Thanks :) Closing.


combat roll interpretations

point out crits, perfect defenses, and near perfect attacks. Some classes have a wider range for near perfects and this should be observed.

This is too crucial to leave for .2, as players presently need to interact with cards to see what they actually rolled. Will shelve wider crit range for now, however.


"BedrockChat" object has no field "temperature" error when trying to use Bedrock

Hi, I have a test evaluation code below, but when I run it, it keeps throwing an error with trying to get temperature from the BedrockChat object (this class doesn't have temperature field). Am I doing anything wrong? Or can someone give me some directions?
from langchain.chat_models import BedrockChat
from ragas.metrics import (
    context_precision,
    answer_relevancy,
    faithfulness,
    context_recall,
)
from ragas.metrics.critique import harmfulness
from datasets import load_dataset
from ragas import evaluate

chat = BedrockChat(
    model_id="anthropic.claude-instant-v1",
    model_kwargs={"temperature":0.0}
)

fiqa_eval = load_dataset("explodinggradients/fiqa", "ragas_eval")
faithfulness.llm.langchain_llm = chat
result = evaluate(
    fiqa_eval["baseline"].select(range(5)),  # showing only 5 for demonstration
    metrics=[faithfulness],
)

Hey @nmklong thanks for pointing this out, Bedrock is not supported at the moment but we will get that out by this weekend

@jjmachan awesome to hear that, thank you!

thankfully #227 will fix this - will release this soon


Further Improve Shop

Some additional nice things to have:

[ ] The ability to set the character image (there's a workaround for this but it should be supported)
[ ] Versioned metadata to allow it to continue to grow over time
[ ] Configuration for keeping items when regenerating the inventory
[ ] Configuration for manually pricing items
[ ] Update base price of not 100% to show int prices
[ ] ??

Can we make the price modifier a bit more apparent (e.g., "Uncivilized World (x4)").  As it stands, it feels obfuscated.

Sadly, no. The intent is to supplement the books, not replace them. As such, it's up to you to be familiar with what the various choices mean.


fixes #5 realign with github.com/xeipuuv/gojsonreference

Coverage remained the same at 100.0% when pulling 128d1c1b2ce8e968f13db00169296e9a0dfc035e on jsonreference-fix into 2270908c98f29ce738848437184ce79b3a7030f4 on master.


Multiline tailwind code not supported

icreate the simple project with jetzig
run by using the zig build run, and it compiled as below

but when break the code in to multiple line it throw error as below

-- i'm using the windwo os 11.

Thanks a lot for raising this, @dhrubrawat66 - I'll update the Zmpl dependency in Jetzig tomorrow when I'm not half-asleep. : )


loading initial data after renderer finishes

Attempting to load initial data after API renderer finishes loading new browser/session

Codecov Report

Merging #1044 (1aab290) into master (070854a) will decrease coverage by 1.58%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #1044      +/-   ##
==========================================
- Coverage   67.03%   65.45%   -1.58%
==========================================
  Files         157      169      +12
  Lines       17202    17553     +351
  Branches     3760     3773      +13
==========================================
- Hits        11532    11490      -42
- Misses       5670     6063     +393

Impacted Files
Coverage Δ

src/App.vue
0.00% <0.00%> (ø)

src/layouts/ZclConfiguratorLayout.vue
71.42% <ø> (+31.89%)
:arrow_up:

... and 37 files with indirect coverage changes

redesigning rather than fixing https://github.com/project-chip/zap/discussions/1050


Daniel praveen kumar patch 2

 Modified Files Coverage Summary

No coverage results for the modified files

 Overall Coverage Summary

            :green_circle: Instructions Coverage (31.77%)

            :red_circle: Branch Coverage (13.04%)


move tests to its own dir parallel to mslib

We don't need to package tests and can easily exclude them

duplicate


Move db-migration to job instead of init-container to allow replicas

Describe changes
This PR implements a pivotal change in our Helm chart deployment process by replacing the existing init container for database migration with a dedicated Helm Job. To ensure timely execution of database migration, Helm hooks with pre-install and pre-upgrade annotations are applied. This enhancement resolves migration issues arising when multiple replicas are deployed, guaranteeing database consistency and aligning the migration Job's execution precisely before the deployment. Extensive testing confirms the smooth operation of this new approach, both with single and multiple replicas in a Kubernetes cluster. The PR also adheres to Helm best practices by setting helm.sh/hook-delete-policy to hook-succeeded. Reviewers, please verify the code changes and execution order during the Helm installation and upgrade.
Pre-requisites
Please ensure you have done the following:

[X] I have read the CONTRIBUTING.md document.
[ ] If my change requires a change to docs, I have updated the documentation accordingly.
[ ] If I have added an integration, I have updated the integrations table and the corresponding website section.
[ ] I have added tests to cover my changes.
[ ] I have based my new branch on develop and the open PR is targeting develop. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Other (add details above)

This is an amazing solution ! So good, in fact, that I think we might even be able to use something similar to implement automated DB downgrades (e.g. for rollbacks or even zenml server downgrades), which is something that would not have been previously possible with the init container.

I went a bit overboard here and forgot the real reason why we can't implement DB downgrades is that we need the new version image during rollback, which isn't possible ATM.

This is an amazing solution ! So good, in fact, that I think we might even be able to use something similar to implement automated DB downgrades (e.g. for rollbacks or even zenml server downgrades), which is something that would not have been previously possible with the init container.

I went a bit overboard here and forgot the real reason why we can't implement DB downgrades is that we need the new version image during rollback, which isn't possible ATM.

I just got an idea of how we might be able to implement this after all:

always use latest as the container image used for the DB migration job
pass the target zenml version as a parameter (command line argument) to the job
the job figures out what the current DB version is, compares it to the one received as a parameter and performs an upgrade/downgrade as the case may be


Note amfora is in maintenance mode

I noted in READEME.dm that amfora is in maintenance mode. Fixes #169

@Solomon1732 Thanks for the PR 🎉


Too many positional arguments

@bh2smith  Updated the PR with the changes and test cases. Please proceed with the review.

@bh2smith Can you review this PR? I have added all the changes and test cases as well.

Hey sorry its been so long. I was kinda waiting on @msf here but I guess we will just go with my suggestion of creating a v2 branch and merging this there.
I do have one, somewhat large, ask about how we approach this.
Instead of using a dictionary for the params I would insist that we use a data class for two reasons.

Accessing entries of a dictionary by key is annoying params["something"] vs params.something
Having a data class, gives developers some inference on what is expected to go there directly in their IDE without having to go to the docs to try and remember.

So I would request that you replace the occurrences of params: Optional[Dict[str, Any]] = None with params: Optional[ResultPageParams] = None
where:
from dataclasses import dataclass
from typing import Optional, List

@dataclass
class ResultPageParams:
    limit: Optional[int] = None
    offset: Optional[int] = None
    columns: Optional[List[str]] = None
    sample_count: Optional[int] = None
    filters: Optional[str] = None
    sort_by: Optional[List[str]] = None

and as for your question

How to handle params for create_table function?

I would suggest doing the same thing. That is create a data class representing some the optional arguments (i.e. those with defaults set {description & is_private}).
Alternatively, we could change pylint to allow 6 parameters instead of 5.
Sorry again for taking so long to get back. I hope the suggested change isn't too involved, but I think it will result in a much better end product. We may also be able to sneak this feature into v1, by taking on the new dataclass as an argument and warning users that the other parameters will deprecated in v2.


Add values to Helm chart for using a shared credentials file

Issue #, if available:
1330
Description of changes:
In the documentation on using a shared credentials file there are instructions for mounting a secret containing AWS credentials on the pod for an ACK controller, so it can use those credentials. However, for this controller there is no way to specify which secret to use when following the installation instructions with Helm. This change adds new values settings that can be used to specify that secret.
Manual testing

Render template

# Generate helm chart
cd aws-controllers-k8s/code-generator
./scripts/build-controller-release.sh rds

# Render template
cd aws-controllers-k8s/rds-controller
# new volume, volume mount, and env vars are visible
helm -n testns template rds-ack helm/ --debug \
   --set aws.credentials.secretName=aws-creds \
   --set aws.credentials.profile=ack > render_with_secret.yaml
# no new stuff is visible
helm -n testns template rds-ack helm/ --debug  > render_without_secret.yaml

Deploy to minikube:

# Create secret with AWS credential as described in https://aws-controllers-k8s.github.io/community/docs/user-docs/authentication/#use-a-shared-credentials-file
## Assuming AWS_SHARED_CREDENTIALS_FILE is properly set
CREDS_CONTENT=$(cat ${AWS_SHARED_CREDENTIALS_FILE} | sed 's/^/    /';)
kubectl create namespace testns
kubectl -n testns apply -f - <<EOF
apiVersion: v1
kind: Secret
metadata:
  name: aws-creds
type: Opaque
stringData:
  credentials: |
$CREDS_CONTENT
EOF

# Install chart as in https://aws-controllers-k8s.github.io/community/docs/tutorials/rds-example/#install-the-ack-service-controller-for-rds
# Without new values setting, the controller fails to find the credentials
helm -n testns install rds-ack helm/ --set=aws.region=us-east-1
$ kubectl -n testns logs -f -l "app.kubernetes.io/instance=rds-ack"
1.6552236370473711e+09  ERROR   setup   Unable to create controller manager     {"aws.service": "rds", "error": "unable to determine account ID: unable to get caller identity: NoCredentialProviders: no valid providers in chain. Deprecated.\n\tFor verbose messaging see aws.Config.CredentialsChainVerboseErrors"}

# Using the additional values settings it is able to get the credentials
helm -n testns upgrade rds-ack helm/ \
   --set=aws.region=us-east-1 \
   --set aws.credentials.secretName=aws-creds \
   --set aws.credentials.profile=ack
$ kubectl -n testns logs -f -l "app.kubernetes.io/instance=rds-ack"
1.655223683774505e+09   INFO    controller.globalcluster        Starting EventSource    {"reconciler group": "rds.services.k8s.aws", "reconciler kind": "GlobalCluster", "source": "kind source: *v1alpha1.GlobalCluster"}
...

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

This is really great, @juanrh . I'll approve, and give others a chance to check it out and they can merge it.
/approve

/ok-to-test

This is awesome! Thanks @juanrh

/lgtm


Pass the system key from the host to the guest

Right now, the clipboard on the guest always assumes the system key is Ctrl, which is wrong for macOS. I started working on passing the platform's system key to the host, but ran into some issues in trying to unify all of the keycodes between {ambient_api, ambient_sys, ambient_wasm, ambient_shared_types, winit}.
I think the best way to do this is to have one KeyCode type that's in ambient_shared_types and use that everywhere, and only convert representations at the point of use.

Fixing this properly will take more time than it's worth - punting this to 0.4


Create all multiple choice stuff in own codepen after pushing 9 out to CDN network

https://www.youtube.com/watch?v=jjAlyvP8Fcw
https://oer.hax.psu.edu/bto108/sites/haxcellence/tutorials/block-usage/question-types
All types documented with examples :)


Invalid --gpus argument

Dear author,
I am running the pokemon_finetune.ipynb with the following setting.
# 2xA6000:
BATCH_SIZE = 4
N_GPUS = 1
ACCUMULATE_BATCHES = 1

gpu_list = ",".join((str(x) for x in range(N_GPUS))) + ","
print(f"Using GPUs: {gpu_list}")

I run the python main.py code block
# Run training
!(python main.py \
    -t \
    --base configs/stable-diffusion/pokemon.yaml \
    --gpus "$gpu_list" \
    --scale_lr False \
    --num_nodes 1 \
    --check_val_every_n_epoch 10 \
    --finetune_from "$ckpt_path" \
    data.params.batch_size="$BATCH_SIZE" \
    lightning.trainer.accumulate_grad_batches="$ACCUMULATE_BATCHES" \
    data.params.validation.params.n_gpus="$NUM_GPUS" \
)

I got an error saying that
main.py: error: argument --gpus: invalid _gpus_allowed_type value: ''

Could you please let me know why?

You're running with N_GPUS = 1, which creates the string gpu_list='0,', but you want it to be gpu_list='0' (without the trailing comma). You can replace the final two lines of the settings with:
if N_GPUS > 1:
  gpu_list = ",".join((str(x) for x in range(N_GPUS))) + ","
else:
  gpu_list = "0"
print(f"Using GPUs: {gpu_list}")

maybe its code mistake, N_GPUS instead of NUM_GPUS

yes, there's a mistake there as pointed out by @mingyao743 .  i will raise a PR if there's not one already

Raised #34 to resolve this.  This change let me progress on my notebook

Thank you all.  This also works for me. May I ask whether I shall close this issue?

Raised #34 to resolve this. This change let me progress on my notebook

Hello dear,
I got the same error saying that
main.py: error: argument --gpus: invalid _gpus_allowed_type value: ''
now i am using this code block on runpod. i use cloud gpu. How can i fix the same error when i was using cloud cpu?
Thanks for answering

Hopefully the author will look at the pending PR, but here's a potential fix https://github.com/LambdaLabsML/examples/pull/65