Skip to content

Instantly share code, notes, and snippets.

@sebastianhaas
sebastianhaas / auth.service.js
Created September 29, 2015 21:21
LoopBack + Angular authentication
(function() {
'use strict';
angular
.module('app.auth')
.factory('authService', authService);
authService.$inject = ['User', 'authEvents'];
/* @ngInject */
@sebastianhaas
sebastianhaas / auth.constants.js
Last active September 29, 2015 10:46
LoopBack + AngularJS authentication solution
(function() {
'use strict';
angular
.module('app.auth')
.constant('authEvents', {
LOGIN_SUCCESS: 'auth_login_success',
LOGIN_FAILED: 'auth_login_failed',
LOGOUT_SUCCESS: 'auth_logout_success',
LOGOUT_FAILED: 'auth_logout_failed',
SetUp : System.TypeInitializationException : An exception was thrown by the type initializer for System.Collections.Generic.List`1
----> System.TypeLoadException : Could not load type 'Couchbase.Lite.Replication[]' from assembly 'Couchbase.Lite, Version=1.1.1.0, Culture=neutral, PublicKeyToken=null'.
TearDown : System.NullReferenceException : Object reference not set to an instance of an object
at Couchbase.Lite.Manager..ctor (System.IO.DirectoryInfo directoryFile, Couchbase.Lite.ManagerOptions options) [0x00000] in <filename unknown>:0
at Couchbase.Lite.Manager.get_SharedInstance () [0x00000] in <filename unknown>:0
at PhonicScore.LibraryCouchbaseLite.CouchbaseLiteLibraryFactory..ctor () [0x00007] in /Users/sebastian/Documents/Development/PhonicScore/_Common/Library/CouchbaseLiteLibraryFactory.cs:20
at PhonicScore.Tests.Library.TestLibrarySheet.SetUp () [0x00022] in /Users/sebastian/Documents/Development/PhonicScore/_Common/Tests/Library_Tests/TestLibrarySheet.cs:37
at (wrapper managed-to-na
@sebastianhaas
sebastianhaas / gist:992c5eee016bca064341
Created September 3, 2015 09:39
Stack trace couchbase.lite exception
SetUp : Autofac.Core.DependencyResolutionException : An exception was thrown while invoking the constructor 'Void .ctor()' on type 'CouchbaseLiteLibraryFactory'. ---> An exception was thrown by the type initializer for Couchbase.Lite.Manager (See inner exception for details.)
----> System.TypeInitializationException : An exception was thrown by the type initializer for Couchbase.Lite.Manager
----> System.TypeInitializationException : An exception was thrown by the type initializer for Couchbase.Lite.ManagerOptions
----> System.TypeInitializationException : An exception was thrown by the type initializer for System.Net.ServicePointManager
----> System.Configuration.ConfigurationErrorsException : Error Initializing the configuration system.
----> System.Threading.ThreadAbortException : Thread was being aborted
TearDown : System.NullReferenceException : Object reference not set to an instance of an object