Crashlytics is not being enabled and does not send crash reports

Please fill in the following fields:
Unity editor version: 2019.3.14
Firebase Unity SDK version: 6.14.1
Source you installed the SDK (.unitypackage or Unity Package Manager): unitypackage
Firebase plugins in use (Auth, Database, etc.): Analytics, Crashlytics
Additional SDKs you are using (Facebook, AdMob, etc.): Facebook
Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac
Platform you are targeting (iOS, Android, and/or desktop): iOS
Scripting Runtime (Mono, and/or IL2CPP): IL2CPP
Please describe the issue here:
(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)
After updating the firebase to 6.14.1 we have noticed that no crashes were received in Crashlytics for the new app version. After enabling the debug mode we noticed that we are getting the following logs:
DEBUG: Disable crashlytics
DEBUG: crashlytics app initializer Disabling
[Crashlytics] Version 3.14.0 (144)
Registering Crashlytics exception handlers
Firebase.Crashlytics.ExceptionHandler:Register()
Firebase.Crashlytics.Crashlytics:Initialize()
Firebase.FirebaseApp:InitializeCrashlyticsIfPresent()
Disable crashlytics
crashlytics app initializer Disabling

When we throw a test exception we get this:
Crashlytics recording exception: Test please ignore
And when we restart the app we get
[Crashlytics:Crash:Reports] Packaged report with id 'ca7e80b52a2142ed82494d4458bde0d6' for submission
Here is the code for initialization:
public class StartupManager : MonoBehaviour
	{
		public void Awake()
		{
			Debug.Log("StartupManager.Awake");
			DontDestroyOnLoad(this);
			Application.targetFrameRate = 60;
			Application.runInBackground = false;
			CheckFireBase();
			Application.logMessageReceived += OnLogMessageReceived;
		}

		private void OnLogMessageReceived(string logMessage, string stackTrace, LogType type)
		{
			Crashlytics.Log(logMessage);
			LogMessagesStorage.Log(logMessage, stackTrace, type);
		}

		public void Start()
		{
			Debug.Log("StartupManager.Start");
		}

		private static void CheckFireBase()
		{
			FirebaseApp.LogLevel = LogLevel.Debug;
			if (FirebaseApp.CheckDependencies() != DependencyStatus.Available)
			{
				FirebaseApp.CheckAndFixDependenciesAsync().ContinueWith(task => { OnFirebaseInitialized(); });
			}
			else
			{
				OnFirebaseInitialized();
			}
		}

		private static void OnFirebaseInitialized()
		{
			var status = FirebaseApp.CheckDependencies();
			if (status == DependencyStatus.Available)
			{
				FirebaseApp app = FirebaseApp.DefaultInstance;
				Debug.LogError("Firebase was initialized. Status: " + status);
			}
			else
			{
				Debug.LogError("Firebase was not initialized. Status: " + status);
			}
		}
	}

Note, we have migrated from fabric before. Can you please confirm that it is ok to have this empty?

Please answer the following, if applicable:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? Did not try
What's the issue repro rate? (eg 100%, 1/5 etc) 100%

Hey @vahagn-harutyunyan because you migrated from Fabric, you'll want to put your legacy Fabric API key in that box in the screenshot you posted. I believe your crashes are being dropped because of that.
In addition, in the next release of the Unity plugin this step won't be needed, so you can also wait for the next release and your situation should get fixed.

Hi @samedson,
Thank you for the answer.
Can you please hint at where we can find the legacy Fabric key? The Fabric web site is not available anymore.
Also, any idea of when the next release will happen?
Thank you in advance.

Hi @samedson
This is to confirm that adding the Fabric api key resolved the issue.

Great! Next release should be in the upcoming week.


Exclusive Mode issue with Star Trek Armada 1 & 2

A while ago I was troubleshooting an issue with Star Trek Armada 1 and found a bug in Microsoft's implementation of ddraw.  Apparently it was introduced in Windows 8.0, and still exists in the latest version of Windows 10.
The issue happens when an application calls SetCooperativeLevel and sets the exclusive flag on a particular window and then later closes that window without releasing the exclusive flag.  In ddraw the exclusive flag remains set on the closed window.  At this point any other call to make another window exclusive will fail, since ddraw still sees the first window as exclusive.  However since the first window no longer exists there is no way to clear the exclusive flag.  This issue happens with both Star Trek Armada 1 and 2.  The result is that both games crash on launch.
I put a fix for this in my code see here.  Basically I set a window hook and look for when the window is closing.  Then before the window closes I remove the exclusive flag.
I thought maybe you would want to put a fix in DDrawCompat for this issue.  I checked the latest experimental version and it is not able to fix this issue.

I can't reproduce this with the latest experimental release on Windows 8.1, using the Armada 1 demo version. On Windows 10, the game crashes before even loading ddraw.dll.
Can you still reproduce this issue? If yes, please attach the debug logs also.

It looks like this is fixed in the latest experimental release.  Thanks.
BTW: You need to update the game to version 1.3 for it to work.  The demo version won't work on Windows 10 for some reason and I don't think you can apply the 1.3 patch on the demo version.


Move hospital_id  to the hospitalization table from the ADT table

move hospital_id  to the hospitalization table if we make a new hopsitalization_id when a patient gets transferred within a health system

@clif-consortium

add patient_id to ADT
If a patient is transferred between different hospitals within a health system, a new hospitalization_id should be created
ER data prior an inpatient admission should be included in the same hospitalization_id
@ingra107 will work on a Post-CLIF script that constructs a healthsystem_stay_id for patients who are transferred between hospitals within a healthsystem


Utilize the crypto lib for pub key derivation.

#97  👈
main

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

Join @zhenlu and the rest of your teammates on  Graphite


The script works well with the BOSE Sountouch wireless adapter

Hello - I am glad to report this works well with the BOSE SoundTouch Wireless Link adapter.
It's particularly useful as this adapter does not come with a remote control.
Thanks a lot for sharing this!

Thanks for reporting. Documentation updated.


unable to resolve compose-permission-handle

I'm unable to sync and use your package.
There's nothing wrong with my build files, I am able to use other packages from jitpack.io...
I've tried using 1.6.0-beta and 1.5.0, but none of them will be resolved.
Can you check your jitpack logs?

OK, I just found out that these versions are failing. Previous versions are fine:

Thank you for bringing it up, I didn't check whether the version actually built after updating, I'm sorry. I'll check what's going on soon and rebuild these versions!

I'm sorry it took so long, but it should be all fixed now :)

you're awesome @dawidraszka


Question: read only mode?

Is there a way to make controls "read only" (displaying the underling model content without allowing to edit it).

Yes, just add e-disabled attribute to the input.

I don't use input. Instead I use a as in this example: http://vitalets.github.io/angular-xeditable/#text-simple and it doesn't seem to work with e-disabled

e-disabled attribute works, here is jsfiddle http://jsfiddle.net/NfPcH/9349/

Oh now I see there is a misunderstanding happened. What I mean by "read only" mode is that you even can not click the control anymore and it is getting "normal" (not link) styles.

I would like the same feature.  What I believe he is asking for is to not show an editor at all if a certain condition is met.  Maybe you have a table containing employees, and only those employees that are not managers can have their vacation days edited, or something like that.  I want to make it so that conditionally the static text is not changed to an editable element.

OK, here is a workaround within an xeditable table:

   {{myValue}}
   {{myValue}}

this would be more elegant if there were a built-in directive to conditionally show the editor.

+1

@dlwhiteman I use the same "work around" in my code, but as some investigation shows, it's rather unperformant when switching lots of items. IMO internal "readonly" implementation could be much more performant since it would not require completely new DOM and attaching/detaching event listeners. Not sure though it is really so when using angular (not an expert here).

As for now there is no built-in directive to do this, I can suggest to use the following workaround:
{{ user.name || 'empty' }}
{{ user.name || 'empty' }}

Here is jsfiddle http://jsfiddle.net/NfPcH/9360/
Internal implementation could be slightly faster, but until you have couple of thousands elements on the page, you should not notice any performance impact.

I can suggest to use the following workaround ...

Gr8! Thx.

BTW, there is a PR #206 that aimed to implement this feature.
Anytime soon will take a look at it and merge if possible

I have another workaround:
Create a function on the row you want to make optional:
template.html
ng-click="showRowForm(rowform.$show())"

controller.js
        $scope.showRowForm = function(param) {
            if($scope.quote.status != '2'){
                return param;
            }
        }

Another way could be to make a manual button to trigger the editable input, and if certain conditions are met display the button, otherwise hide it

You could use edit-disabled=true and use some css to style the link so that it doesn't appear clickable.  Not sure if this will work, but you could try it:  a[edit-disabled=true] {     cursor: default; text-decoration:none; }

I have the same problem and asking for the same feature (didn't find your issue before posting) : #496
Using a dynamic edit-disable doesn't work

@eugef I think this can be closed since edit-disable is now dynamic and #496 was also closed


Integration of Map in Contact us section

Can you assign me this feature under GSSoC with level

@HK853 not needed now.


Improve visibility for network traffic billing

Which package/s are you suggesting this feature for?
Dashboard
Is your feature request related to a problem? Please describe
Currently billing for network traffic isn't in the foreground when using the deployment pricing calculator and the solution/contract views. Adding some info and insights into network billing can help avoid surprises for users.
Describe the solution you'd like
For the deployment pricing calculator, we can consider some combination of:

Alerting the user that network traffic billing is not included in the calculations
Add a box where the user can enter a GB per month traffic estimate to include in the calculation

Likewise, for the contracts view:

Add a column to the contracts table showing network consumption (the table is already crowded though)
In the billing overview at the top, give a breakdown of how network traffic is contributing to the total hourly cost

This is a bit complex, because traffic billing is discounted at the same rate as the contract
So it would require querying the nru reports for each contract, calculating the per contract billed amount for traffic based on the contract discount rate, and finally summing a total

bandwidth already updated in the pricing calculator.

https://www.manual.grid.tf/knowledge_base/cloud/pricing/pricing.html

verified on devnet
Version c2d6060
go to the pricing calculator and enable the ipv4 and verify the cost of using the bandwidth

pricing
testcase


Last entry bug fixed.

At the previous PR, I've relocated the new history addition code block.
But now I've seen that I've forgotten to move the localStorage.setItem line.
It should be fixed now.

Hey @izerozlu,
Your changes look good to me!
View build log
TravisBuddy Request Identifier: 284ccc10-c819-11e9-81bc-119d202e6590


File name and bytes in attachment

After last update I lost access to structure object in attachment, so I can't get name and bytes from attachment :(
This is dump from IncomingMessage object after recive message
SSilence\ImapClient\IncomingMessage Object
(
    [header] => stdClass Object
        (
			(...)
        )

    [message] => stdClass Object
        (
			(...)
        )

    [attachments] => Array
        (
            [0] => stdClass Object
                (
                    [name] =>
                    [body] => (... file content ...)

                    [info] => SSilence\ImapClient\Section Object
                        (
                            [_structure:SSilence\ImapClient\Section:private] => stdClass Object
                                (
                                    [type] => 5
                                    [encoding] => 3
                                    [ifsubtype] => 1
                                    [subtype] => PNG
                                    [ifdescription] => 0
                                    [ifid] => 0
                                    [bytes] => 1462
                                    [ifdisposition] => 1
                                    [disposition] => ATTACHMENT
                                    [ifdparameters] => 1
                                    [dparameters] => Array
                                        (
                                            [0] => stdClass Object
                                                (
                                                    [attribute] => FILENAME
                                                    [value] => matrix2.png
                                                )

                                        )

                                    [ifparameters] => 1
                                    [parameters] => Array
                                        (
                                            [0] => stdClass Object
                                                (
                                                    [attribute] => NAME
                                                    [value] => matrix2.png
                                                )

                                        )

                                )

                            [_body:SSilence\ImapClient\Section:private] => (... file content ...)
                        )

                )

            [1] => stdClass Object
                (
                    [name] =>
                    [body] => (... file content ...)
                    [info] => SSilence\ImapClient\Section Object
                        (
                            [_structure:SSilence\ImapClient\Section:private] => stdClass Object
                                (
                                    [type] => 5
                                    [encoding] => 3
                                    [ifsubtype] => 1
                                    [subtype] => PNG
                                    [ifdescription] => 0
                                    [ifid] => 0
                                    [bytes] => 1368
                                    [ifdisposition] => 1
                                    [disposition] => ATTACHMENT
                                    [ifdparameters] => 1
                                    [dparameters] => Array
                                        (
                                            [0] => stdClass Object
                                                (
                                                    [attribute] => FILENAME
                                                    [value] => matrix1.png
                                                )

                                        )

                                    [ifparameters] => 1
                                    [parameters] => Array
                                        (
                                            [0] => stdClass Object
                                                (
                                                    [attribute] => NAME
                                                    [value] => matrix1.png
                                                )

                                        )

                                )

                            [_body:SSilence\ImapClient\Section:private] => (... file content ...)
                        )

                )

        )

    [section] => Array
        (
            [0] => 1
            [1] => 2
            [2] => 3
            [5] => 1.1
            [7] => 1.2
        )

    [structure] => stdClass Object
        (
            [type] => 1
            [encoding] => 0
            [ifsubtype] => 1
            [subtype] => MIXED
            [ifdescription] => 0
            [ifid] => 0
            [ifdisposition] => 0
            [ifdparameters] => 0
            [ifparameters] => 1
            [parameters] => Array
                (
                    [0] => stdClass Object
                        (
                            [attribute] => BOUNDARY
                            [value] => ------------21334FFD26233AB3A7504396
                        )

                )

            [parts] => Array
                (
                    [0] => stdClass Object
                        (
                            [type] => 1
                            [encoding] => 0
                            [ifsubtype] => 1
                            [subtype] => ALTERNATIVE
                            [ifdescription] => 0
                            [ifid] => 0
                            [ifdisposition] => 0
                            [ifdparameters] => 0
                            [ifparameters] => 1
                            [parameters] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [attribute] => BOUNDARY
                                            [value] => ------------171DF408167DC306F693EBBA
                                        )

                                )

                            [parts] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [type] => 0
                                            [encoding] => 1
                                            [ifsubtype] => 1
                                            [subtype] => PLAIN
                                            [ifdescription] => 0
                                            [ifid] => 0
                                            [lines] => 8
                                            [bytes] => 178
                                            [ifdisposition] => 0
                                            [ifdparameters] => 0
                                            [ifparameters] => 1
                                            [parameters] => Array
                                                (
                                                    [0] => stdClass Object
                                                        (
                                                            [attribute] => CHARSET
                                                            [value] => utf-8
                                                        )

                                                    [1] => stdClass Object
                                                        (
                                                            [attribute] => FORMAT
                                                            [value] => flowed
                                                        )

                                                )

                                        )

                                    [1] => stdClass Object
                                        (
                                            [type] => 0
                                            [encoding] => 1
                                            [ifsubtype] => 1
                                            [subtype] => HTML
                                            [ifdescription] => 0
                                            [ifid] => 0
                                            [lines] => 16
                                            [bytes] => 535
                                            [ifdisposition] => 0
                                            [ifdparameters] => 0
                                            [ifparameters] => 1
                                            [parameters] => Array
                                                (
                                                    [0] => stdClass Object
                                                        (
                                                            [attribute] => CHARSET
                                                            [value] => utf-8
                                                        )

                                                )

                                        )

                                )

                        )

                    [1] => stdClass Object
                        (
                            [type] => 5
                            [encoding] => 3
                            [ifsubtype] => 1
                            [subtype] => PNG
                            [ifdescription] => 0
                            [ifid] => 0
                            [bytes] => 1462
                            [ifdisposition] => 1
                            [disposition] => ATTACHMENT
                            [ifdparameters] => 1
                            [dparameters] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [attribute] => FILENAME
                                            [value] => matrix2.png
                                        )

                                )

                            [ifparameters] => 1
                            [parameters] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [attribute] => NAME
                                            [value] => matrix2.png
                                        )

                                )

                        )

                    [2] => stdClass Object
                        (
                            [type] => 5
                            [encoding] => 3
                            [ifsubtype] => 1
                            [subtype] => PNG
                            [ifdescription] => 0
                            [ifid] => 0
                            [bytes] => 1368
                            [ifdisposition] => 1
                            [disposition] => ATTACHMENT
                            [ifdparameters] => 1
                            [dparameters] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [attribute] => FILENAME
                                            [value] => matrix1.png
                                        )

                                )

                            [ifparameters] => 1
                            [parameters] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [attribute] => NAME
                                            [value] => matrix1.png
                                        )

                                )

                        )

                )

        )

    [debug] =>
    [imapStream:SSilence\ImapClient\IncomingMessage:private] => Resource id #5
    [id:SSilence\ImapClient\IncomingMessage:private] => 1
    [uid:SSilence\ImapClient\IncomingMessage:private] =>
    [countAttachment:SSilence\ImapClient\IncomingMessage:private] => 2
)

foreach($attachments as $attachment){
$attachment->info->structure
}

This does not work?

I'm testing, working.
    $imap->getMessage(9);
    var_dump($imap->incomingMessage->attachments[0]->info->structure->bytes);

File name
$imap->incomingMessage->attachments[0]->name;

Attachment
$imap->incomingMessage->attachments[0]->body;

Is this issue solved?

Yes, seems to work. I can't find reason why this before not worked. Ok topic maybe closed. Thanks


Detect correct block instance when running block tasks

Let's assume we have two instances of the same block type on a single page, and that they have an action like
public function action_CustomBlockAction()
{
    // ...
}

Currently, to determine if the request should be resolved to that block action, we call isValidControllerTask in the PageController.
But the BlockController isValidControllerTask does not check for the block ID.
What about changing the BlockController isValidControllerTask to something like this?
public function isValidControllerTask($method, $parameters = array())
{
    if (strpos($method, 'action_') !== 0) { // gotta start with action_
        return false;
    }
    if (is_callable(array($this, $method))) {
        $r = new \ReflectionMethod(get_class($this), $method);
        if (count($parameters) - $r->getNumberOfParameters() <= 1) {
            // how do we get <= 1? If it's 1, that means that the method has one fewer param. That's ok because
            // certain older blocks don't know that the last param ought to be a $bID. If they're equal it's zero
            // which is best. and if they're greater that's ok too.
            // ##### NEW CODE #####
            $bID = array_pop($parameters);
            if ((is_string($bID) || is_int($bID)) && $bID == $this->bID) {
                return true;
            }
        }
    }

    return false;
}

If we don't do so, the block action is always executed on the first block instance...

That makes sense to me.

This is broken. I'm reverting this commit on the 5.7.x branch. I don't know what it's doing, but it makes the Elemental blog page 404 if you click on one of the topics.

Before reverting them, can I try to see what's wrong?

I already reverted the commit, but we'd accept another pull request against 5.7.x. For some reason it appears to work fine in v8

It doesn't seems to work for v8 either.

There are two problems here:

Controller of TopicList block, method getTopicLink: we don't include the block ID as the last parameter of the URL, so the BlockController::isValidControllerTask method don't match any block instance
the action_topic method should be executed for both the TopicList and PageTitle block controllers.

So, what about this approach?

add a flag like this to the Concrete\Core\Block\BlockController class

protected $blockActionsMatchBlockID = true;

set this $blockActionsMatchBlockID flag to false for the two block controllers (TopicList and PageTitle)
update the isValidControllerTask method with something like this:

if ($this->blockActionsMatchBlockID) {
    return true;
}
$bID = array_pop($parameters);
if ((is_string($bID) || is_int($bID)) && $bID == $this->bID) {
    return true;
}

For BC, we could set the default value of  $blockActionsMatchBlockID to false.
If this is ok, I'd create a PR

What about something like this? https://github.com/mlocati/concrete5/commit/2fbe26661e5727f7c39b72c190a2cf5d712c1212

Could we use reflection to detect this and automatically provide it with
some kind of log warning that it's deprecated?
I'm not sure that we really want to support it without the ID provided
moving forward.
On Tue, Dec 6, 2016 at 8:30 AM Michele Locati<EMAIL_ADDRESS>wrote:

What about something like this? mlocati@2fbe266
https://github.com/mlocati/concrete5/commit/2fbe26661e5727f7c39b72c190a2cf5d712c1212
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/concrete5/concrete5/issues/4658#issuecomment-265197458,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA9fO0TjYcxdAzPPmfv7ic14AJNeMhzEks5rFY2RgaJpZM4KycVC
.

99% of block actions I've ever seen don't have a $bID parameter...
Furthermore, like the case I described above in point 1, some block actions must be able to be executed independently from the originating block, so I think that this approach makes everybody happy

Furthermore, like the case I described above in point 1

Sorry, point 2

Actually looking back at this; I understand why we're making this change, but can't this effecitvely be solved just by specifying $bID in the action methods that really need to be specifically filtered by block?
For example, the topic link and page title actions currently work today – but the form block submit action_submit_form method will only fire for the relevant block on the page, because it uses $bID as its parameter. Shouldn't this just be a documentation and best practices issue?

Do you mean that almost every block action should check the passed block ID? I mean, something like this:
public function action_dosomething($bID)
{
    if ($bID != $this->bID) {
        return;
    }
    // ...
}

If that's what you mean, this could lead to problems:

some functions may rely on the result of isValidControllerTask to check if an action is valid for a block controller (example)
we would call the on_start method of every block instance many times for every block instance on the page (reference), even if the specific task checks the block ID
we would consider a request as valid even if it is not (reference)
The deliverResponse method of the Concrete\Controller\Backend\Block\AbstractController class would run the task for only one of the instances of the block

So, generally speaking, I think that it's a lot safer to have a isValidControllerTask method that returns true if the action is valid for a specific block instance.

I'm wondering how useful this is really going to be.
Correct me if I'm wrong but C5 has never actually included any kind of bID check for block tasks and it has never been a problem. I think every developer knows that if checking the bID is a requirement (like for the form block as pointed out by Andrew) they should do the check themselves.
Again correct me if I'm wrong but those block tasks give us flexibility in terms of number and types of parameters. Forcing one specific parameter at a specific position is going to create more problems than needed for something that is already being taken care of individually by devs.

Hey Again. After careful consideration, my previous comment was maybe a bit too rushed.
Anyway, I looked into it and I might have a solution.
What I noticed is when a task is used directly, as it is in the form block, the bID is added automatically at the end. You can see it in the action() function in the BlockView class.
The problem with the topic list is the page gets the information first through its controller pageController.
In that class, through the function validateRequest() it first checks the task by sending it to its own isValidControllerTask() function.
If it is not, it then lists all the blocks and one by one call their isValidControllerTask() function.
This is there the bID is missing that makes mlocati improvement fail.
I modified that function to add the bID to the parameters array and it now works with mlocati first modification.
In pageController I modified the validateRequest() function like this
foreach ($blocks as $b) {
    $controller = $b->getController();
    list($method, $parameters) = $controller->getPassThruActionAndParameters($this->parameters);
    // [NOUR] here checking if it is a proxy or not
    if (is_object($b->getProxyBlock())) {
        $b = $b->getProxyBlock();
    }
    // [NOUR] Add the block ID at the end of the parameters array
    $parameters[] = $b->getBlockID();

    if ($controller->isValidControllerTask($method, $parameters)) {
        // [NOUR] it is a valid task for that block, let's remove the bID we added and go on with our lives
        array_pop($parameters);
        $controller->on_start();
        $response = $controller->runAction($method, $parameters);
        if ($response instanceof Response) {
            return $response;
        }
// old school blocks have already terminated at this point. They are redirecting
// or exiting. But new blocks like topics, etc... can actually rely on their $set
// data persisting and being passed into the view.

// so if we make it down here we have to return true –so that we don't fire a 404.
        $valid = true;

// then, we need to save the persisted data that may have been set.
        $controller->setPassThruBlockController($this);
    }
}

If someone could confirm that this is ok, i'd be happy to make the change and send a pull request

I think the easiest way to move forward on this to simply create a pull request and then test it ourselves on the following use cases:

Built-in Blog List page, filtering page titles, page list and the topics list properly.
Form Submit
Survey Submit.
Form submission when block is in a stack.
Form submission when a block is in a clipboard
Form submission when multiple forms are on a page, only the proper form submits and shows the message.

ok I created a pull request.

After running the tests suggested by @aembler
1- Works fine
2- works fine
3- works fine
4- doesn't work
5- It submits properly but it's actually weird. I add a form in a stack and add the stack to the page. I copy the form that's in the stack to the clipboard. I add the form from the clipboard to the page. Then I add the same form from the clipboard to the page. If I submit the first form from the clipboard, both this one and the form in the stack get the success message. No other form is affected. I checked they do have different bID. However, I edited the first form copied from the clipboard (just modified the button's label) and it fixed the problem. But if I submit the second form from the clipboard it works as expected.
6- works except for what I explain above.
I also ran in a problem with an action in a block's add form since there is no bID yet. I fixed that as well. So as far as I could see tasks now work when:
1- in a block's add or edit screen
2- in a block's view
3- when called through a url and going through the page's controller
The only problem still to be solved is with the block in a stack. I'm working on it.
Also it seems Travis is failing on everything submitted at the moment so I'm not sure how to deal with that.

@korvinszanto I think github automatically closed this, but it should remain open imo

Yeah, it's because there's Fix #4658 for v5.7 in the commit message. hmmmm

The commit c3db41444c4cff820d7e64107362884163306679 might broke express form block.

Are you sure it's linked to this commit? I don't see how it would give an "access denied" error. But I might be wrong.

Also I don't actually see Access Denied when I attempt to do what you're
doing in that video.
On Fri, Jan 13, 2017 at 10:18 AM, Nour Akalay<EMAIL_ADDRESS>wrote:

Are you sure it's linked to this commit? I don't see how it would give an
"access denied" error. But I might be wrong.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/concrete5/concrete5/issues/4658#issuecomment-272508443,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAgNwQul3XB6UGF76eKSsPOoERCE3abQks5rR7_vgaJpZM4KycVC
.

Maybe a permission issue then? unrelated to the code?

I've tested again with clean installed concrete5 8.0.1a1 (current develop branch), but still I got the same error.

If I revert the commit c3db41444c4cff820d7e64107362884163306679, the error fixed.

@hissy is right. Somehow the revert that I did before was undone in a recent merge back into develop.

I have again reverted this change in develop and the express form block works again.


Add documentation for operator-sdk test command

There is currently no documentation in sdk-cli-reference.md regarding the operator-sdk test command.

Resolved by #404


still some missing strings in estonian translation

I keep checking those and will report them under this ticket.

Light Drizzle, Mist

Light Rain, Rain And Snow, Mist


Indexing of AnalogSignals and IrregularlySampledSignals using numpy arrays

This PR is based on #557. In addition to #557 it implements indexing of AnalogSignals and IrregularlySampledSignals via numpy arrays. The returned object is a quantity object, as the temporal information can not necessarily be captured by an AnalogSignal or IrregularlySampledSignal.
See also #556 for the discussion.

Hello @JuliaSprenger! Thanks for submitting the PR.

In the file neo/core/analogsignal.py, following are the PEP8 issues :

Line 158:5: E122 continuation line missing indentation or outdented
Line 210:9: E122 continuation line missing indentation or outdented
Line 211:9: E122 continuation line missing indentation or outdented
Line 212:9: E122 continuation line missing indentation or outdented
Line 247:9: E122 continuation line missing indentation or outdented
Line 248:9: E122 continuation line missing indentation or outdented
Line 430:13: E128 continuation line under-indented for visual indent
Line 431:13: E122 continuation line missing indentation or outdented

In the file neo/core/irregularlysampledsignal.py, following are the PEP8 issues :

Line 387:22: E712 comparison to True should be 'if cond is True:' or 'if cond:'
Line 390:22: E712 comparison to False should be 'if cond is False:' or 'if not cond:'

In the file neo/test/coretest/test_analogsignal.py, following are the PEP8 issues :

Line 267:13: E122 continuation line missing indentation or outdented
Line 268:13: E122 continuation line missing indentation or outdented
Line 276:13: E122 continuation line missing indentation or outdented
Line 277:13: E122 continuation line missing indentation or outdented

In the file neo/test/coretest/test_irregularysampledsignal.py, following are the PEP8 issues :

Line 664:21: E122 continuation line missing indentation or outdented
Line 665:21: E122 continuation line missing indentation or outdented
Line 666:9: E122 continuation line missing indentation or outdented

Coverage increased (+0.04%) to 49.5% when pulling e80f71c91441c20829b2093f404907785e961957 on JuliaSprenger:jpgill86-fix-assert_array_equal into 90a1a7acc24d0b82236605a7d2ace0a4702c4e1a on NeuralEnsemble:master.

@jpgill86 Is this the solution you had in mind?

@JuliaSprenger, yes, this looks good!
Since indexing into a multi-trace AnalogSignal could in general result in different numbers of samples per trace, I think it makes sense to raise an IndexError when this happens. However, for the special case where the number of samples is the same for all traces, would it make sense to add a test to test_analogsignalarray.py?
def test__comparison_as_indexing(self):
    assert_array_equal(self.signal1[self.signal1 < 10],
                       np.array([[0, 1, 2, 3, 4],
                                 [5, 6, 7, 8, 9]]) * pq.nA)

Yes, I agree. I added two more tests. More suggestions for improvement?

Looks good to me! 👍

@samuelgarcia, @apdavison: could one of you have a look and merge if you agree to the changes?

As a general point, all of the formatting changes make it difficult to review the actual important code changes. I'm not at all sure that @pep8speaks is a net positive, we should review the decision to install this at some point.
More specific to the real changes, what was the argument for going with Quantity rather than IrregularlySampledSignal as the return type? Under what conditions is an IrregularlySampledSignal unable to capture the temporal information?

In the case of the IrregularlySampledsignal containing multiple traces in combination with arbitrary indexing, the resulting array contains entries related to different times, so it can't be represented as a (single) IrregularlySampledSignal.
Here is an example
i = IrregularlySampledSignal([1,2,3] * pq.s, [[2,1],[1,1],[1,2]]*pq.V)
mask = i > 1
j = i[mask]

Currently a quantity array is returned containing the indexed entries.  If we strictly wanted to stick to neo objects, the only option would be to return multiple IrregularlySampledSignals, which might run into more numpy related problems in the long run.

ok, I was thinking only of 1D indexes, but I guess for NumPy interoperability we need to support arbitrary indexing.

I am back, sorry for the long silence.
Even if it is late, I am OK with this.
I also totally agree with @apdavison  that pep8 is total regression.
It is becoming very hard to understand  the real patch.
Specially in that case when few lines are involved but with a big impact.
Thanks for the work!!


Remove double brakes from Earthly

This was a lot simpler than when the ticket was originally created thanks to us moving the logic to the Dockerfiles 🎉
fixes #1759

if we got no brakes, we gonna crash! :P

@Itxaka good point 😅


[GHSA-rvp4-r3g6-8hxq] Insufficiently Protected Credentials via Insecure Temporary File in org.apache.nifi:nifi-single-user-utils

Updates

CVSS
Severity

Thanks for the update


All changes for initial open-source milestone release under com.rallyhealth

Closing this until the full v1.0.0 is ready for review.


Create a scroll animation

Add specific animation on scroll

added animation to blocks with a "container" class, using js and css


Current status

Please refer to

The doc https://cjycode.com/flutter_smooth/
The project board https://github.com/users/fzyzcjy/projects/5

First of all thank you for your great work.
The link does not work.

@Erik0806 Not a mistake - it was wrongly set to private (default permission?). I fixed it after seeing your comment :)

Wow that was fast. Thank you

You are welcome!

What is the compatibility for 120fps?

It should work well.
But current code comes from my prototype which hardcode the number 60, so need to have some (trivial) PR and it will work well. this package definitely has no special limitation on 60!

I wanted to try it in Flutter 3.3.4 but I guess a dev version is needed. By the way, it causes fps drops in ImageFilter.blur, would you consider doing a special work for blur? You are really good at this, thanks

Indeed a custom engine build: https://github.com/fzyzcjy/flutter_smooth/issues/150#issuecomment-1283276166

By the way, it causes fps drops in ImageFilter.blur, would you consider doing a special work for blur

That seem to be rasterizer jank, which Flutter team is solving probably via the Impeller :)

added to readme, thus this issue is closed


refactor: Embed net.TcpConn in custom connection struct to avoid manual method implementations

Changes:

The custom Conn structure now embeds the standard library net.TcpConn.
Functions already available via embedding are removed.
Conn structures now require dereferencing the TCP connection accepted when listening.

Looks good to me. Let me test it tonight and merge. Thanks!


add acceptLicense method to SQLServer

Fixes: #2050
Adds accept license method to the MSSQLServerContainer class while still allowing users to accept the license via a resource file.  Updated customizable test class to use the new method, while the simple test class uses the resource file.  Also updated documentation.

For issue #2050

Resolved merge conflicts

@rnorth thank you so much!  It looks like I don't have authorization to merge.
Is that something you will need to do?

@KyleAure yep - will do now 😄


Flatlaf fixes

First, swap over isActive variable logic over to panel side rather than try to keep the plugin class updated with that info.
Second, fix buttons not respecting background color when button is disabled. Flatlaf buttons function a bit differently than regular JButtons.

There's some oddities with setting the clientproperty object, investigating.

For some reason, setting the clientproperty thing messes with whatever was done on setFont, so removing these will fix the oddities, however the buttons are now a little bigger than they used to be, oh well.


sm2_sig_verify(): Do not call BN_CTX_end() without BN_CTX_start()

In case of memory allocation failure this could happen.
This was reported to us by kak1

Merged to all the active branches. Thank you for the reviews.


[Bug] Getting signed out after closing app

Is there an existing issue for this?

[X] I have searched the existing issues

Have you read the FAQ?

[X] Yes, I read the FAQ

Device info

iOS/iPadOS version: 16.4.1
Device model: iPhone Xs
Sideload tool (AltStore, Sideloadly, TrollStore,...): Signulous
The specific version of CercubePlus (latest or newest is NOT a version number!): 18.11.2-5.3.13 and 18.13.4-5.3.13

Describe the bug
Signing into Google works, but I get signed out as soon as I relaunch the app.
Steps to reproduce the issue

Open YouTube app, sign in to Google
Close YouTube app from app switcher
Open YouTube app (no longer signed in)

Crash log (if the app crashes)
No response
Are you using the newest version of CercubePlus? If not, why?
✅ Yes, I'm using the latest version of CercubePlus right now
Does the issue happen with the official YouTube from AppStore?
❌ No, It doesn't
Additional context
CercubePlusExtra_18.09.4_5.3.11.ipa does not have this issue.

Apologies, just noticed the other thread


Added spark operator helm chart dependencies

Added spark operator helm chart dependencies

Reverted changes made in README.md and committed into repository


Update devise-security.gemspec

Fixes #72

Pull Request Test Coverage Report for Build 265

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 93.707%

Totals

Change from base Build 259:
0.0%

Covered Lines:
1102

Relevant Lines:
1176

💛  - Coveralls


Jekyll serve throws errors when serving default jekyll-bootstrap config

When running jekyll serve in the directory cloned from the bootstrap repo, it throws a long list of errors:
Configuration file: /home/ws/Git/jekyll-bootstrap/_config.yml
/home/ws/Git/jekyll-bootstrap/_plugins/debug.rb:13:in `<module:Jekyll>': cannot load such file -- jekyll/post (LoadError)
        from /home/ws/Git/jekyll-bootstrap/_plugins/debug.rb:8:in `<top (required)>'
        from /home/ws/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/ws/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:75:in `block (2 levels) in require_plugin_files'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:74:in `each'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:74:in `block in require_plugin_files'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:73:in `each'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:73:in `require_plugin_files'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/lib/jekyll/plugin_manager.rb:18:in `conscientious_require'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/lib/jekyll/site.rb:97:in `setup'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/lib/jekyll/site.rb:49:in `initialize'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/lib/jekyll/commands/build.rb:30:in `new'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/lib/jekyll/commands/build.rb:30:in `process'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/lib/jekyll/commands/serve.rb:26:in `block (2 levels) in init_with_program'
        from /home/ws/.gem/ruby/2.2.3/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
        from /home/ws/.gem/ruby/2.2.3/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
        from /home/ws/.gem/ruby/2.2.3/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
        from /home/ws/.gem/ruby/2.2.3/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
        from /home/ws/.gem/ruby/2.2.3/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
        from /home/ws/.gem/ruby/2.2.3/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
        from /home/ws/.gem/ruby/2.2.3/gems/jekyll-3.0.0/bin/jekyll:17:in `<top (required)>'
        from /home/ws/.gem/ruby/2.2.3/bin/jekyll:23:in `load'
        from /home/ws/.gem/ruby/2.2.3/bin/jekyll:23:in `<main>'

Serving a site generated by "jekyll new" works flawlessly, however.

Hi Wsadowski
This morning set up an environment also encountered the same problem. I just wrote a note to share with you.
gem install jekyll    #Default version jekyll 3.0.0     2015.11.1
gem uninstall jekyll  #Uninstall high version jekyll
gem install jekyll -v '2..5.3'

problem goes to debug plugin. removing that one would resolve these errors

I've encountered this to using Jekyll v3.0.0. I resolved it by commenting out the first module in debug.ru
require 'pp'
# module Jekyll
#   # Need to overwrite the inspect method here because the original
#   # uses < > to encapsulate the psuedo post/page objects in which case
#   # the output is taken for HTML tags and hidden from view.
#   #
#   class Post
#     def inspect
#       "#Jekyll:Post @id=#{self.id.inspect}"
#     end
#   end

#   class Page
#     def inspect
#       "#Jekyll:Page @name=#{self.name.inspect}"
#     end
#   end

# end # Jekyll

module Jekyll
  module DebugFilter

    def debug(obj, stdout=false)
      puts obj.pretty_inspect if stdout
      "<pre>#{obj.class}\n#{obj.pretty_inspect}</pre>"
    end

  end # DebugFilter
end # Jekyll

Liquid::Template.register_filter(Jekyll::DebugFilter)


examples handling authenticated clients

this has been a torn in my side for a while, if you can provide an example with authenticated clients that would be super.

@masterkain that's a good suggestion! I think I can update the polls demo to add a section that needs authentication :)
Do you have any preference regarding auth system? I'll try with a cookie based session if not 😊

cookies / auth token would be a blessing for me, need to better understand what to do when a client becomes unauthenticated, how to properly pass auth data to the client after login, etc. ❤

This library is amazing for firebase
https://github.com/awinogrodzki/next-firebase-auth-edge
easy examples

I just have it doing this now
layout.tsx
import { getTokens } from 'next-firebase-auth-edge/lib/next/tokens';
import { cookies } from 'next/dist/client/components/headers';
import { ApolloWrapper } from '../components/apollo-wrapper';
import { AuthProvider } from '../components/auth-provider';
import { mapTokensToTenant } from '../lib/firebase/auth';
import { serverConfig } from '../lib/firebase/server-config';

import './global.css';

export const metadata = {
  title: 'Nx Next App',
  description: 'Generated by create-nx-workspace',
};

export default async function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  const tokens = await getTokens(cookies(), {
    serviceAccount: serverConfig.serviceAccount,
    apiKey: serverConfig.firebaseApiKey,
    cookieName: 'AuthToken',
    cookieSignatureKeys: ['secret1', 'secret2'],
  });

  const tenant = tokens ? mapTokensToTenant(tokens) : null;

  return (
    <html lang="en">
      <body>
        <AuthProvider defaultTenant={tenant}>
          <ApolloWrapper token={tokens?.token}>{children}</ApolloWrapper>
        </AuthProvider>
      </body>
    </html>
  );
}

apollo-wrapper.tsx
'use client';

import {
  ApolloClient,
  ApolloLink,
  HttpLink,
  SuspenseCache,
} from '@apollo/client';
import {
  ApolloNextAppProvider,
  NextSSRInMemoryCache,
  SSRMultipartLink,
} from '@apollo/experimental-nextjs-app-support/ssr';
import React from 'react';

const uri = process.env.NEXT_PUBLIC_HASURA_URL;

function createClient(token: string | undefined) {
  const httpLink = new HttpLink({
    uri,
    headers: token
      ? {
          Authorization: `Bearer ${token}`,
        }
      : {
          'x-hasura-admin-secret': 'myadminsecretkey',
        },
  });

  return new ApolloClient({
    cache: new NextSSRInMemoryCache(),
    link:
      typeof window === 'undefined'
        ? ApolloLink.from([
            new SSRMultipartLink({
              stripDefer: true,
            }),
            httpLink,
          ])
        : httpLink,
  });
}

function makeSuspenseCache() {
  return new SuspenseCache();
}

export function ApolloWrapper({
  children,
  token,
}: React.PropsWithChildren<{
  token: string | undefined;
}>) {
  const makeClient = React.useCallback(() => createClient(token), [token]);

  return (
    <ApolloNextAppProvider
      makeClient={makeClient}
      makeSuspenseCache={makeSuspenseCache}
    >
      {children}
    </ApolloNextAppProvider>
  );
}

Yup, that's a very good approach!
Just to highlight the important parts from your code snippet to make it easier for other people following along:

use cookies() from 'next/dist/client/components/headers' in a React Server Component to get the current cookies, and extract your token from them
pass that token as a prop into your ApolloWrapper.
use that token in your makeClient function

Thanks @seanaguinaga! How do you update the given token when it expired ?

Any examples of doing this with Next-Auth?

@rafaelsmgomes You probably don't need context here, in Next.js you should be able to just call headers() or cookies() within your registerApolloClient callback.

Thanks @seanaguinaga! How do you update the given token when it expired ?

The auth library does that for me, thankfully

Hi, @phryneas!
I still don't understand how to crack this one.
This is how I used to authenticate the getServerSideProps function:
export async function getServerSideProps(ctx: GetServerSidePropsContext<{ symbol: string }>) {
  const { symbol } = ctx.params!
  const { req, res } = ctx

  const apolloClient = initializeApollo({})

  const context: DefaultContext = {
    headers: {
      cookie: req.headers?.cookie, // this is where I'm passing the cookies down to authenticate
    },
  }

  await apolloClient.query({
      query: GET_PROFILE_CHART,
      variables: { symbol, fromDate },
      context,
    }),

  return addApolloState(apolloClient, {
    props: { symbol },
  })
}

I'm trying to authenticate my user on the register client function calls via:
import { ApolloClient, HttpLink, InMemoryCache } from '@apollo/client'
import { registerApolloClient } from '@apollo/experimental-nextjs-app-support/rsc'
import { cookies } from 'next/dist/client/components/headers'

export const { getClient } = registerApolloClient(() => {

  let nextCookies = cookies()
    .getAll()
    .reduce((acc, cur) => {
      const { name, value } = cur
      acc += `${name}:${value}`
      return acc
    }, '')
  return new ApolloClient({
    cache: new InMemoryCache(),
    link: new HttpLink({
      // https://studio.apollographql.com/public/spacex-l4uc6p/
      // uri: '/api/graphql',
      uri: 'http://localhost:3000/api/graphql',
      headers: {
        cookie: nextCookies,
      },
      credentials: 'same-origin',

      // you can disable result caching here if you want to
      // (this does not work if you are rendering your page with `export const dynamic = "force-static"`)
      // fetchOptions: { cache: "no-store" },
    }),
  })
})

That did not work, but neither did passing the context in the getClient function:
  let nextCookies = cookies()
    .getAll()
    .reduce((acc, cur) => {
      const { name, value } = cur
      acc += `${name}:${value}`
      return acc
    }, '')

  const { data } = await getClient().query({
    query: TEST_QUERY,
    variables: { symbol },
    context: { headers: { cookie: nextCookies } },
  })

I thought this would work, and I don't see another way of doing it.
Maybe I added the cookies in a wrongful way? But that would mean the headers need to be passed differently now?
Maybe I have to call cookies in a different way. Or not pass it in the same manner as it works in the frontend. I don't know.

@rafaelsmgomes It feels to me that both of these should be working - have you tried to console.log that nextCookies variable?

Hi @phryneas! Thanks for letting me know as I pursuing the right solution!
The issue was within the keyboard and the chair on my side of the screen.
The reduce function had a couple of mistakes!
I'll put it here in case anyone is wondering:
  let nextCookies = cookies()
    .getAll()
    .reduce((acc, cur, i, arr) => {
      const { name, value } = cur
      acc += `${name}=${value}${arr.length - 1 !== i ? '; ' : ''}` // forgot to give it a space after each cookie. Also, was using ":" instead of "="
      return acc
    }, '')

Is there an example of how to use this with Next Auth? I'm having a lot of issues with getting this to work in both client and server side components.

getTokens

One issue I'm having is that, my login page is part of the same app.
when makeClient is called with user A token and then during the same session you log out and login with user B. makeClient will not get called again with the new token.
my flow is

User visits "/login"
Login with Credentials A and cookie gets set by external API
Navigate user to dashboard using next/navigation
Log out and navigate to login using next/navigation
Login with Credentials B and cookie gets set by external API
Navigate user to dashboard using next/navigation

The dashboard information is still showing information from Credentials A. The components are mix of "use client" and "use server". When console logging the token it only ever gets set on when makeClient is called, which only happens once.
as a work around for now I do window.location.href = "/dashbaord"; and window.location.href = "/login"; when navigating between private and public pages so that makeClient gets called with the correct token.
any ideas what i might be doing wrong or solution for this issue?

Yup, that's a very good approach!
Just to highlight the important parts from your code snippet to make it easier for other people following along:

use cookies() from 'next/dist/client/components/headers' in a React Server Component to get the current cookies, and extract your token from them
pass that token as a prop into your ApolloWrapper.
use that token in your makeClient function

One issue I'm having is that, my login page is part of the same app.
when makeClient is called with user A token and then during the same session you log out and login with user B. makeClient will not get called again with the new token.
my flow is

User visits "/login"
Login with Credentials A and cookie gets set by external API
Navigate user to dashboard using next/navigation
Log out and navigate to login using next/navigation
Login with Credentials B and cookie gets set by external API
Navigate user to dashboard using next/navigation

The dashboard information is still showing information from Credentials A. The components are mix of "use client" and "use server". When console logging the token it only ever gets set on when makeClient is called, which only happens once.
as a work around for now I do window.location.href = "/dashbaord"; and window.location.href = "/login"; when navigating between private and public pages so that makeClient gets called with the correct token.
any ideas what i might be doing wrong or solution for this issue?

Looking for some help on this myself, I am just trying to send in a new token/create a new authorization header when a user logins. My setToken function gets called when a successful login comes back, I noticed my makeClient was never being called again...Any help would be greatly appreciated! :D
export const Wrapper = ({children}: {children: React.ReactNode}) => {
  const [token, setToken] = React.useState<string>()
  const makeClient = React.useCallback(() => createClient(token), [token])
  return (
    <ApolloNextAppProvider makeClient={makeClient}>
      <ToastProvider>
        <UserProvider setToken={setToken}>{children}</UserProvider>
      </ToastProvider>
    </ApolloNextAppProvider>
  )
}

Seems like currently the only way is to save token in local storage/cookies and reload page. ApolloNextAppProvider specifically creates singleton and calls makeClient once in server context and once in client one.
https://github.com/apollographql/apollo-client-nextjs/blob/main/package/src/ssr/ApolloNextAppProvider.tsx

@ben-hapip @chvllad  You should never recreate your whole ApolloClient instance when an authentication token changes.
The best way to solve this would storing the auth token in a way that is transparent to Apollo Client - in a httpOnly secure cookie.
If that is not possible, you could e.g. use a ref to hold your token, inline your makeClient function and access that ref from your setContext link to add the authentication header.

Ayyy thanks fellas for the suggestions!! 🤝

Looking for some help on this myself, I am just trying to send in a new token/create a new authorization header when a user logins. My setToken function gets called when a successful login comes back, I noticed my makeClient was never being called again...Any help would be greatly appreciated! :D

Has this been solved @ben-hapip ? I tried your solution @phryneas but it does not work for me :(

@romain-hasseveldt Again, makeClient will not be called again, and you should also never do that in the browser. You should keep one Apollo Client instance for the full lifetime of your application, or you will throw your full cache away.
If you show a code example here, I can show you how to leverage a ref here to change a token without recreating the client.

Hello @phryneas , thank you for the promptness of your response. Here is what my current implementation looks like:
'use client';

import { ApolloLink, from } from '@apollo/client';
import { setContext } from '@apollo/client/link/context';
import {
  ApolloNextAppProvider,
  NextSSRInMemoryCache,
  NextSSRApolloClient,
  SSRMultipartLink,
} from '@apollo/experimental-nextjs-app-support/ssr';
import { createUploadLink } from 'apollo-upload-client';
import { User } from 'next-auth';
import { useSession } from 'next-auth/react';

function makeClient(user?: User) {
  const httpLink = createUploadLink({
    uri: process.env.NEXT_PUBLIC_BACK_GRAPHQL_URL,
  }) as unknown as ApolloLink;

  const authLink = setContext((_, { headers }) => {
    return {
      headers: {
        ...headers,
        authorization: user ? `Bearer ${user.jwt}` : '',
      },
    };
  });

  const links = [authLink, httpLink];

  return new NextSSRApolloClient({
    cache: new NextSSRInMemoryCache(),
    link:
      typeof window === 'undefined'
        ? from(
            [
              new SSRMultipartLink({
                stripDefer: true,
              }),
              links,
            ].flat(),
          )
        : from(links),
  });
}

export function ApolloWrapper({ children }: React.PropsWithChildren) {
  const { data: session } = useSession();

  return (
    <ApolloNextAppProvider makeClient={() => makeClient(session?.user)}>
      {children}
    </ApolloNextAppProvider>
  );
}

In that case, you need to move makeClient into the scope of your ApolloWrapper:
export function ApolloWrapper({ children }: React.PropsWithChildren) {
  const { data: session } = useSession();
  const sessionRef = useRef(session);
  sessionRef.current = session;

  function makeClient() {
    const httpLink = createUploadLink({
      uri: process.env.NEXT_PUBLIC_BACK_GRAPHQL_URL,
    }) as unknown as ApolloLink;

    const authLink = setContext((_, { headers }) => {
      return {
        headers: {
          ...headers,
          authorization: user ? `Bearer ${sessionRef.current.user.jwt}` : "",
        },
      };
    });

    const links = [authLink, httpLink];

    return new NextSSRApolloClient({
      cache: new NextSSRInMemoryCache(),
      link:
        typeof window === "undefined"
          ? from(
              [
                new SSRMultipartLink({
                  stripDefer: true,
                }),
                links,
              ].flat()
            )
          : from(links),
    });
  }

  return (
    <ApolloNextAppProvider makeClient={makeClient}>
      {children}
    </ApolloNextAppProvider>
  );
}

It does not seem to work (at least in my case). The value of sessionRef as I retrieve it in setContext is always null, which corresponds to the initial value passed to useRef, even though it later gets updated in the useEffect. Do you have any idea what the issue might be? Thanks again for your help!

And you're actually accessing sessionRef.current and not destructuring something somewhere?
One correction though:
-          authorization: user ? `Bearer ${sessionRef.current.user.jwt}` : "",
+          authorization: sessionRef.current.user ? `Bearer ${sessionRef.current.user.jwt}` : "",

This is the current state of my implementation:
export function ApolloWrapper({ children }: React.PropsWithChildren) {
  const { data: session } = useSession();
  const sessionRef = useRef(session);
  useEffect(() => {
    sessionRef.current = session;
  }, [session]);

  function makeClient() {
    const httpLink = createUploadLink({
      uri: process.env.NEXT_PUBLIC_BACK_GRAPHQL_URL,
    }) as unknown as ApolloLink;

    const authLink = setContext((_, { headers }) => {
      return {
        headers: {
          ...headers,
          authorization: sessionRef.current?.user
            ? `Bearer ${sessionRef.current?.user.jwt}`
            : '',
        },
      };
    });

    const links = [authLink, httpLink];

    return new NextSSRApolloClient({
      cache: new NextSSRInMemoryCache(),
      link:
        typeof window === 'undefined'
          ? from(
              [
                new SSRMultipartLink({
                  stripDefer: true,
                }),
                links,
              ].flat(),
            )
          : from(links),
    });
  }

  return (
    <ApolloNextAppProvider makeClient={makeClient}>
      {children}
    </ApolloNextAppProvider>
  );
}

And if you add some console.log calls here:
  useEffect(() => {
    console.log("updating sessionRef to", session
    sessionRef.current = session;

and here
    const authLink = setContext((_, { headers }) => {
      console.log("working with", sessionRef.current)
      return {

what log(and which order) do you get?

I have the following:

updating sessionRef to session object
working with null

Hey @romain-hasseveldt 👋
Could you try assigning the sessionRef on every render? This should keep it in sync with the latest value since effects fire after render (which means that session will always "lag behind" a bit)
Try this:
const sessionRef = useRef(session);

// assign on every render to keep it up-to-date with the latest value
sessionRef.current = session;

Thank you for trying @jerelmiller  :) I tested out of curiosity, and... it doesn't work either.

This is honestly weird - could you try to create a small reproduction of that?

So I believe I got token auth working for use client components via
app/ApolloWrapper.tsx
"use client";
// ^ this file needs the "use client" pragma
// https://github.com/apollographql/apollo-client-nextjs

import { ApolloLink, HttpLink } from "@apollo/client";
import {
  ApolloNextAppProvider,
  NextSSRInMemoryCache,
  NextSSRApolloClient,
  SSRMultipartLink,
} from "@apollo/experimental-nextjs-app-support/ssr";
import { envvars } from "@lib/envvars";

// have a function to create a client for you
function makeClient(token:string|undefined) {
  const httpLink = new HttpLink({
    // this needs to be an absolute url, as relative urls cannot be used in SSR
    uri: envvars.API_URI,
    headers: {
      Authorization: token ? `Bearer ${token}` : '',
    },

    // you can disable result caching here if you want to
    // (this does not work if you are rendering your page with `export const dynamic = "force-static"`)
    fetchOptions: { cache: "no-store" },
    // you can override the default `fetchOptions` on a per query basis
    // via the `context` property on the options passed as a second argument
    // to an Apollo Client data fetching hook, e.g.:
    // const { data } = useSuspenseQuery(MY_QUERY, { context: { fetchOptions: { cache: "force-cache" }}});
  });

  return new NextSSRApolloClient({
    // use the `NextSSRInMemoryCache`, not the normal `InMemoryCache`
    cache: new NextSSRInMemoryCache(),
    link:
      typeof window === "undefined"
        ? ApolloLink.from([
            // in a SSR environment, if you use multipart features like
            // @defer, you need to decide how to handle these.
            // This strips all interfaces with a `@defer` directive from your queries.
            new SSRMultipartLink({
              stripDefer: true,
            }),
            httpLink,
          ])
        : httpLink,
  });
}

// you need to create a component to wrap your app in
export function ApolloWrapper({ token, children }: React.PropsWithChildren<{
  token: string | undefined;
}>) {
  return (
    <ApolloNextAppProvider makeClient={() => makeClient(token)}>
      {children}
    </ApolloNextAppProvider>
  );
}

I'm also trying to figure out auth via Server side client.ts script
client.ts
import { HttpLink } from "@apollo/client";
import {
  NextSSRInMemoryCache,
  NextSSRApolloClient,
} from "@apollo/experimental-nextjs-app-support/ssr";
import { registerApolloClient } from "@apollo/experimental-nextjs-app-support/rsc";
import { envs } from "@/envs";
import { cookies } from "next/headers";

export const { getClient } = registerApolloClient(() => {

  const cookieStore = cookies()
  const cookieSession = cookieStore.get('keystonejs-session')
  console.log('cookieSession::::: ');
 const token = cookieSession?.value
 console.log(`==== Bearer ${token}`);

  return new NextSSRApolloClient({
    cache: new NextSSRInMemoryCache(),
    link: new HttpLink({
      uri: envs.API_URI,
    }),
    headers: {
      'Authorization': (token) ? `Bearer ${token}`: "",
      'Content-Type': 'application/json'
    },
  })
})

I know I'm getting the right session token because It works when I manually set the token in Apollo Studio Sandbox it works, but If I manually set the token inside this client.ts it still doesn't work.
a linke to the full source code git repo

Hi everyone,
I'm encountering an issue with Apollo Client and Auth.js in my Next.js application. The problem is that when making GraphQL requests, the cookies are being overwritten by Auth.js, causing my API to respond that the necessary authorization cookie was not sent.
Current setup:

Next.js application (app router)
Using Apollo Client for GraphQL requests
Auth.js for authentication

The issue:
When Apollo Client makes a request, it seems that Auth.js is overwriting or removing the cookies I'm trying to set for authorization on the client side. As a result, my API is failing to authorize the requests.
I've tried several approaches, however, these attempts haven't resolved the cookie conflict with Auth.js on the client side.
Questions:

Is there a known issue or best practice for using Apollo Client alongside Auth.js?
How can I ensure that my authorization cookies are properly sent with Apollo Client requests without being overwritten by Auth.js?
Are there any specific Apollo Client configuration options I should be aware of to prevent this cookie conflict?

Any insights or suggestions would be greatly appreciated. If you need any additional information about my setup, please let me know.
Thank you in advance for your help!
Here's my Apollo Client configuration:
'use client';

import { type PropsWithChildren } from 'react';
import { ApolloLink, HttpLink } from '@apollo/client';
import { loadDevMessages, loadErrorMessages } from '@apollo/client/dev';
import { setContext } from '@apollo/client/link/context';
import {
  ApolloClient,
  ApolloNextAppProvider,
  InMemoryCache,
  SSRMultipartLink,
} from '@apollo/experimental-nextjs-app-support';
import { useSession } from 'next-auth/react';

if (process.env.NODE_ENV === 'development') {
  loadDevMessages();
  loadErrorMessages();
}

export function ApolloWrapper({ children }: PropsWithChildren) {
  const { data: session } = useSession();

  const makeClient = () => {
    // Create an HTTP link to the GraphQL API
    const httpLink = new HttpLink({
      uri: process.env.NEXT_PUBLIC_API_URL,
      fetchOptions: { cache: 'no-store' },
      credentials: 'include',
    });

    // Create an authentication link to set the appropriate headers
    const authLink = setContext((_, { headers }) => {
      return {
        headers: {
          ...headers,
          cookie: headers?.cookie.concat(
            session
              ? `access-token=${session?.access_token}; refresh-token=${session?.access_token}`
              : '',
          ),
        },
      };
    });

    // Create the links for the client and server
    const clientLinks = [authLink, httpLink];
    const ssrLinks = [
      new SSRMultipartLink({ stripDefer: true }),
      ...clientLinks,
    ];

    // Create the Apollo Client
    return new ApolloClient({
      cache: new InMemoryCache(),
      link: ApolloLink.from(
        typeof window === 'undefined' ? ssrLinks : clientLinks,
      ),
    });
  };

  if (!session) return null;

  return (
    <ApolloNextAppProvider makeClient={makeClient}>
      {children}
    </ApolloNextAppProvider>
  );
}